ThemeShaper Forums » Thematic

Using WP-PostRatings

(4 posts)
  • Started 9 years ago by bilingual website design
  • Latest reply from Chris
  • This topic is resolved
  1. Hi
    I would like to use the WP-PostRatings plugin, and their usage states ...

    # Open wp-content/themes/<YOUR THEME NAME>/index.php
    You may place it in single.php, post.php or page.php also.
    # Find:
    <?php while (have_posts()) : the_post(); ?>
    # Add Anywhere Below It (The Place You Want The Ratings To Show):
    <?php if(function_exists('the_ratings')) { the_ratings(); } ?>

    So I guess I could copy index.php from the thematic folder into my child theme and make these changes. But is that the best way to do it? then when you change thematic i dont get the updates to index.php because my custom one overrides it.

    So I was wondering if I can make this work by coding something in the functions.php file, as this is really how the child theme idea should work. I am trying to work out how to to it and guess that it is along the lines of this post but for a different function, but I am a bit lost at this level of php and was hoping for some pointers



    Posted 9 years ago #
  2. bump

    Posted 9 years ago #
  3. .. will check today



    Posted 9 years ago #
  4. Ok .. this is pretty wild .. so don't blame me, if your server implodes while using this code :-)

    function add_postratings($postfooter) {
    $postfooter .= ob_get_contents();
    return $postfooter;
    add_filter('thematic_postfooter', 'add_postratings');

    Haven't found any other way to get around 'the_ratings' using echo for output.



    Posted 9 years ago #

RSS feed for this topic


You must log in to post.