rappayi
Forum Replies Created
-
Forum: Plugins
In reply to: [WP-PostRatings] need add rating after post or page!If you are interested to know how to create a site specific plugin to add above code without touching the functions.php file, You may check this page.
http://www.rappayi.com/wordpress/add-content-at-the-end-of-each-post-in-a-wordpress-blog-post-1514
Forum: Plugins
In reply to: [WP-PostRatings] need add rating after post or page!I achieved this using a new function.
You may add the code below either in the functions.php file or if you don’t want to mess up default functions.php file of wordpress installation or your theme’s function.php, you can make it part of a site specific plugin you may have on your site. I use the later method. I have a own plugin, written for my site which has any overrides to existing wordpress functions or additional functions like this created for custom purpose. Hope this helps.Result can be reviewed on my website http://www.rappayi.com
/* add wp_postratings at end of post */
add_filter(‘the_content’, ‘ratings_bottom_of_every_post’);
if( !function_exists(“ratings_bottom_of_every_post”)){
function ratings_bottom_of_every_post($content){
if ( is_single() && ! is_admin() ) {
$add_txt = ‘<p>Rate this page : [ratings]</p>’;
return $content . $add_txt;
}
else
{
return $content;
}
}
}