Forums

What about putting it in a place other than the Sidebar? (4 posts)

  1. thunksalot
    Member
    Posted 2 years ago #

    I want to create a "Top Content" page that has most e-mailed posts, most viewed posts, most commented posts and most recent comments. I want to use the "Get-Recent-Comments" plugin to provide the most recent comments component. However, it doesn't seem to work when I place it outside of the Sidebar. Any idea why?

  2. thunksalot
    Member
    Posted 2 years ago #

    I figured it out. I needed to install and turn-on runPHP to execute the PHP script within a Page. But, that also necessitated re-writing the installation script so that all the PHP logic happened within one PHP instance:

    <?php
    if (function_exists('get_recent_comments')) {
    print "<h2>";
    _e('Recent Comments:');
    print "</h2>

      ";
      get_recent_comments();
      print "
    ";
    }

    if (function_exists('get_recent_trackbacks')) {
    print "<h2>";
    _e('Recent Trackbacks:');
    print "</h2>

      ";
      get_recent_trackbacks();
      print "
    ";
    }
    ?>

    Works great. Exactly like I wanted.

  3. Root
    Member
    Posted 2 years ago #

    This is really neat. Thanks.

  4. gofree
    Member
    Posted 1 year ago #

    Great idea, but I don't know to put install this code. Let's say I am using non-widget theme, so where do I have to install this?

    Regards,

Topic Closed

This topic has been closed to new replies.

About this Topic