Support » Plugins » [Plugin: upPrev Previous Post Animated Notification] Upnext? Link to next post

  • I am not a coder at all, but I can sometimes stumble my way through code and try to figure out what’s going on.

    I love this plugin, but I’m trying to modify this plugin to link to the next newer post (instead of previous).

    I have found an modified the part of the code so that it somewhat functions the way I would like.

    Here is what I have so far:

    $args = array(
                "numberposts" => 1,
                "category" => implode(',',$catIDs),
                "orderby" => "date",
                "order" => "ASC"
            $posts = get_posts($args);
            $i = 0;
            foreach($posts as $row){
                if ($row->ID == get_the_ID())
            echo "<div id='upprev_box'>\n\t<h6>\n\t\tMore in ";
            the_category(', ');
            echo "<span class='num'> ($i of " . count($posts) . " articles)</span>\n\t</h6>\n\t";
            echo "<div class='upprev_excerpt'>\n\t\t";
            if ($display_thumb)
                echo "<a href='".get_permalink($posts[$i]->ID)."' title='".$posts[$i]->post_title."'>". get_the_post_thumbnail($posts[$i]->ID,array(48,48),array('title'=>$posts[$i]->post_title,'class'=>'upprev_thumb')) . "</a>\n\t\t";
            echo "<p>\n\t\t\t";
            next_post_link('%link','%title', true);

    After making these changes, the next post title and content are displayed, as is desired, but there are still problems as follows:
    – $i of ” . count($posts) . ” articles does not display the correct post number and total number of posts
    – the very first post (oldest) does not show the upprev callout at all

    Any ideas?

  • The topic ‘[Plugin: upPrev Previous Post Animated Notification] Upnext? Link to next post’ is closed to new replies.