Forums

Blog-in-Blog
[resolved] Pagination (Previous / Next) not displaying as a link (4 posts)

  1. cbiagi
    Member
    Posted 4 months ago #

    Hi,

    My client's website has a special page which uses Blog-in-Blog to display posts from only one category. Everything seems to work fine, except the pagination (Previous / Next) links at the bottom of the page display as text, not as a link.

    Here is the live page:
    http://rhfd.org/press-releases/

    As you can see, the first 10 "Press Releases" posts display, but the older posts cannot be viewed because the "Previous" link does not work.

    The BiB shortcode I am using for this page is:
    [bib category_id=6 num=10]

    Here is the HTML generated by the plugin for the pagination div:

    <div class="bib_page_nav">
    <span class="bib_prev_link_inactive">« Previous Page</span>  
    <a href="/press-releases/?" class="bib_page_number bib_selected" style="none"" > 1</a> 
    <a href="/press-releases/?&bib_page_offset=10" class="bib_page_number bib_not_selected" style="none"" >2</a> 
    <a href="/press-releases/?&bib_page_offset=20" class="bib_page_number bib_not_selected" style="none""
    <a class="bib_next_link" href="/press-releases/?&bib_page_offset=10">Next Page »</a></div>

    http://wordpress.org/extend/plugins/blog-in-blog/

  2. cbiagi
    Member
    Posted 4 months ago #

    Update - as of this posting I have temporarily changed num=10 to num=100, so at least all the posts from the Press Releases category will be viewable for now. Note that the pagination at the bottom still does not work as a link (and, it actually shouldn't display at all, since all of the posts from that category are being shown... but that isn't a huge deal).

  3. cbiagi
    Member
    Posted 4 months ago #

    OK, I had some other weird bugs with this plugin, so I had to drop it :(

    BUT, in case you ran into the same problem as me, here's my solution! This is nice because it uses a template instead of a plugin.

    I used the "A Page of Posts" example from http://codex.wordpress.org/Pages as a starting point. If you're like me and don't understand PHP, your best bet is to make a test page using the 2011 theme, and then replace the example code with your own template code one piece at a time, and re-load your test page after each change so you can see what you're affecting. That was the easiest way for me to figure it out.

    Put this code at the top of your template (replace "press releases" with whatever you want to call your template).

    <?php
    /*
    Template Name: Press Releases
    */
    ?>

    Then, I created an EMPTY page, and selected my Press Releases template in the page's settings. The page is empty because the template php code will put the posts from my Press Releases category into the content area automatically.

    Here's the code for my template's entire content area. You will just need to replace the html tags to suit your own template. Please note the comment "Change these category SLUGS to suit your use." You will need to replace my press-releases category with the slug from your own site's special category.

    [Code moderated as per the Forum Rules. Please use the pastebin]

  4. cbiagi
    Member
    Posted 3 months ago #

    Whoops, here's the code:

    http://pastebin.com/BnqZXSMw

Reply

You must log in to post.

About this Plugin

About this Topic