Hi.. I want to add a BACK TO HOME link to all of my pages automatically. I downloaded this plugin, http://downloads.wordpress.org/plugin/subscribe-remind.1.2.zip I was expecting to remove the rss feed code from it and put my BACK TO HOME html there , but this only appears on POSTS page , and not PAGES . The code is, <?php define('SUBSCRIBE_REMIND_TEXT', '<em>If you enjoyed this post, make sure you <a href="%s">subscribe to my RSS feed</a>!</em>'); function subscribe_remind($content) { if ( is_single() ) $content .= "\n\n" . sprintf(SUBSCRIBE_REMIND_TEXT, get_bloginfo('rss2_url')); return $content; } add_filter('the_content', 'subscribe_remind'); ?> Code (markup): Now, what do I need to modify or add here, so that this can appear on my PAGES also, and not just posts. Please help..
Try this: <?php define('SUBSCRIBE_REMIND_TEXT', '<em>If you enjoyed this post, make sure you <a href="%s">subscribe to my RSS feed</a>!</em>'); function subscribe_remind($content) { $content .= "\n\n" . sprintf(SUBSCRIBE_REMIND_TEXT, get_bloginfo('rss2_url')); return $content; } add_filter('the_content', 'subscribe_remind'); ?> Code (markup):
Another question.. Lets say, I want to exclude few Pages , from showing this . So, how can I do that ? I have the Page IDs ready in a list.
I think you can do it like this: if(get_the_ID()!=5 || get_the_ID()!=85){ // the code } or you can have an array with the pages ids that you want to exclude and do like this: if(array_search(get_the_ID(),$excluding_pages_ids)===false){ // the code }