Using the Social fields in the SEO Plugin, we don't have to enter this data into the theme too:
/**
* Use Yoast SEO Plugin to create these constants
* http://wordpress.org/plugins/wordpress-seo/
* https://gist.github.com/germanny/6222479
*/
Using the Social fields in the SEO Plugin, we don't have to enter this data into the theme too:
/**
* Use Yoast SEO Plugin to create these constants
* http://wordpress.org/plugins/wordpress-seo/
* https://gist.github.com/germanny/6222479
*/
define('WP_DEBUG', true); | |
/** | |
* When debug mode is enabled, you can enable logging to store errors in wp-content/debug.log | |
* This is useful for finding errors that might not get displayed on screen | |
* | |
* The next conditional section will make sure errors are not shown to users when logging is enabled | |
* This helps with quick troubleshooting on live sites | |
*/ | |
define('WP_DEBUG_LOG', true); |
// first set the body to hide and show everyhthing when fully loaded ;) | |
document.write("<style>body{display:none;}</style>"); | |
jQuery(document).ready(function(){ | |
jQuery( 'input.search-field' ).addClass( 'form-control' ); | |
// here for each comment reply link of wordpress | |
jQuery( '.comment-reply-link' ).addClass( 'btn btn-primary' ); |
#Sample Post H1
This is a sample post written in markdown. Markdown on Save Improved will ensure that when this post is saved, it will retain its syntax.
##Markdown Items (H2)
Writing Markdown is extremely simple, but incase you have problems you can read about the syntax of Markdown here, or read a useful cheat sheet here
###Lists
<?php | |
//add your server aliases here | |
$servers = array( | |
"185.14.184.234" => "mcfly.bensmann.no", | |
"185.14.184.xxx" => "another.server.com", | |
); | |
//this script is triggered by this command from the terminal or cron: | |
//echo "time=`uptime`&df=`df -h`" | curl -s -d @- http://domain.com/path/to/script.php |
<?php | |
/** | |
* WordPress WP_QUERY-wrapper to simplify getting and working with posts | |
* | |
* Does something with posts, using a callback | |
* Setups global post variable before running callback | |
* And restores it afterwards | |
* | |
* An introductionary blogpost about this function is posted on our blog: |
<?php | |
/** | |
* Examples for WordPress function with_posts() | |
* | |
* The main function is available here: | |
* https://gist.github.com/bonny/5011943 | |
* | |
* Author and contact info: | |
* https//twitter.com/eskapism |
// Minimal YouTube & Vimeo embeds | |
function wp_oembed_get( $url, $args = '' ) { | |
if(preg_match("/youtube.com\/watch\?v=([^&]+)/i", $url, $aMatch)){ | |
return '<iframe width="640" height="360" src="http://www.youtube.com/embed/' . $aMatch[1] . '?loop=1&modestbranding=1&rel=0&showinfo=0&autohide=1" frameborder="0" allowfullscreen></iframe>'; | |
} | |
if(preg_match("/youtube.com\/watch\?feature=player_embedded&v=([^&]+)/i", $url, $aMatch)){ | |
return '<iframe width="640" height="360" src="http://www.youtube.com/embed/' . $aMatch[1] . '?loop=1&modestbranding=1&rel=0&showinfo=0&autohide=1" frameborder="0" allowfullscreen></iframe>'; | |
} |