Three WP Recipes WordPress Blog Hacks

I’m so much in love with the blog WP Recipes as they are so innovative with their wordpress hacks. Here are 5 of their hacks that I find so uber uber hot

1. How to Display your feedburner count in full text
Simply add the code to your sidebar.php file or if you use the wordpress plug-in EXEC-PHP, add it to a sidebar text widget.

<? php
$fburl=”https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=YourURL“;
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $fburl);
$stored = curl_exec($ch);
curl_close($ch);
$grid = new SimpleXMLElement($stored);
$rsscount = $grid->feed->entry[‘circulation’];
echo $rsscount;
?>

Save it and you’re good to go.
Credit: How to Display your feedburner count in full text

2. How To Control When Your Posts Are Available Via RSS.
I love this hack cos it prevents my readers from getting last minute mistakes in my blog posts. Your theme MUST have a functions.php file to implement this hack. If it doesn’t, create one.

function publish_later_on_feed($where) {
global $wpdb;
if ( is_feed() ) {
$now = gmdate(’Y-m-d H:i:s’);
$wait = ‘5′; $device = ‘MINUTE’; $where.=” AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, ‘$now’) > $wait “;
}
return $where;
}
add_filter(’posts_where’, ‘publish_later_on_feed’);

Paste the code above into your functions.php file before the ending tag, ?>. The parts in red determine when your posts are made available via rss. For example, in the code above it’s set to 5minutes after post has been published.
You can modify this number to minutes, hours etc.
Credit: How to: Control when your posts are available via rss

3. How to List Scheduled Posts
I always take a day or two out in a month to draft at least 10 blog posts for the upcoming month that way even if I’m very busy with work at the hospital, my blog stays updated with fresh content.
I also like showing my readers what’s coming next on my blog so as to peak their interest and even get them to subscribe to my feed. This hack has seen my feed subscribers rising slowly unlike before when it was absolutely STAGNANT.

<?php
$my_query = new WP_Query(’post_status=future&order=DESC&showposts=5′);
if ($my_query->have_posts()) {
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID; ?>
<li><?php the_title(); ?></li>
<?php endwhile;
}
?>

Paste the code wherever you want it to appear in your theme and you’re done. Personally I prefer it been displayed in a sidebar widget. For that make sure, your have EXEC-PHP installed like Hack No. 1.

As an alternative, you can simply paste it in the sidebar.php file.

I recommended changing DESC to ASC so that the post in the top of the list will be the first to be published. You can also change the number of scheduled posts to show.
Credit: How to List scheduled posts

Hope you all benefit from these wonderful hacks. Feel free to share links to more amazing hacks below.

Reviewer's Rating!
Leave Your Own Rating!
[Total: 0 Average: 0]

You’ll also like:

  1. TunnelGuru, TroidVPN, DroidVPN, PD Proxy as Free Internet Browsing Hacks
  2. How To Add Jetpack Related Posts To Google AMP Pages
  3. How To Make Mozilla Firefox Faster
  4. How To Create A Floating Social Bookmarking Google Search Toolbar
  5. Adsense For Mobile Content Wordpress Setup Guide

Please share this article to help others. Thanks