12th
command-line
SELECT u.ID, u.user_login
FROM wp_users u, wp_usermeta um
WHERE u.ID = um.user_id
AND um.meta_key = ‘wp_capabilities’
AND um.meta_value LIKE ‘%administrator%’;
To disable WordPress autosaving function, simply open your functions.php file and paste the following function:
function disableAutoSave(){
wp_deregister_script('autosave');
}
add_action( 'wp_print_scripts', 'disableAutoSave' );
That’s all. Once you saved the file, WordPress will never autosave a post. To enable autosaving again, simply delete this code.
You can just place the following code into your functions.php file within your theme folder.
function set_canonical() {
if ( is_single() ) {
global $wp_query;
echo '<link rel="canonical" href="'.get_permalink($wp_query->post->ID).'"/>';
}
}
add_action('wp_head', 'set_canonical');
That’s it! Now if you go to any version of your post page, you will see the little link on the top of the page publicly telling bots that the preferred version of the page is the permalink version. Take that duplicate contents!
First, you have to add the following code to your function.php file. Don’t forget to change the adsense code, unless you’d like to display my ads on your own site ![]()
function showads() {
return '<script type="text/javascript"><!--
google_ad_client = "pub-3637220125174754";
google_ad_slot = "4668915978";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
';
}
add_shortcode('adsense', 'showads');
Once you saved the functions.php file, you’re now able to embed your adsense code on your posts and display it exactly where you want. To do so, simply paste the following code on the editor, in html mode:
[adsense]