Skip to:
Content
Pages
Categories
Search
Top
Bottom

Pagination broken when using shortcode for topic index

Viewing 7 replies - 1 through 7 (of 7 total)
  • Argh… I can’t reproduce this with either the TWenty Thirteen or Twenty Fourteen theme yet I see the issue on your site!

    All of the following combinations work for me

    Using a page with the [bbp-topic-index] shortcode

    http://example.com/sample-page/ http://example.com/sample-page/page/2/
    http://example.com/support/ http://example.com/support/page/2/
    http://example.com/forums/ http://example.com/forums/page/2/

    Using a page with the [bbp-forum-index] and [bbp-topic-index] shortcode

    http://example.com/sample-page/ http://example.com/sample-page/page/2/
    http://example.com/support/ http://example.com/support/page/2/
    http://example.com/forums/ http://example.com/forums/page/2/

    Not using a page (using native bbPress /forums slug with “Forum root should show – Topics by Freshness”)
    http://example.com/forums/ http://example.com/forums/page/2/

    Any change your using a modified Twenty Thirteen theme?

    How about plugin conflicts?

    Have you tried resetting/flushing your permalinks?


    Jamie Marsland
    Participant

    @jamesmarsland

    Hi Stephen,

    Thanks for the in-depth reply :)

    It looks like I’ve fixed it by selecting “Forum root should show – Topics by freshness”

    Do you know why this fixes the pagination issue when using shortcodes and partnering with a page?

    Thanks very much for your help!

    Jamie

    Do you know why this fixes the pagination issue when using shortcodes and partnering with a page?

    No ;)

    I’m not sure what is going on there, I’ll dig around a bit further and see what I can come up with, it should work for any combination of use cases though once you start adding two shortcodes per page it looks like bbPress may have an issue deciding which shortcode to honour the pagination for.


    Jamie Marsland
    Participant

    @jamesmarsland

    Hi Stephen,

    Actually this also happens if only 1 shortcode is used on a page.

    Jamie


    WilRC
    Participant

    @wilrc

    Any news on this?
    using several shortcodes breaks the paginationfunction! I have these shortcodes:

    [bbp-forum-index]
    [tabs type="horizontal"] [tabs_head] [tab_title]Recente Topics[/tab_title] [tab_title]Ongelezen Topics[/tab_title] [tab_title]Zoeken[/tab_title] [/tabs_head] [tab][bbp-topic-index][/tab] [tab][bbp-single-view id="no-replies"][/tab] [tab][bbp-search-form][/tab] [/tabs]

    Clicking on page2 gives a no resultpage!


    WilRC
    Participant

    @wilrc

    When using shortcode bbp-topic-index with other shortcode (bbp-forum-index)pagination returning url is different than using topic-index by freshness.
    => with multiple shortcodes: ../forums/page/2/
    => with topics by freshness: ../forum/forumname/page/2/
    How to solve this?


    WilRC
    Participant

    @wilrc

    I ran into this code:`
    <?php
    function fix_pagination($args) {
    global $wp_query,$bbp;
    $max_pages = $bbp->topic_query->max_num_pages;
    $page = $bbp->topic_query->paged;
    $mybase = get_permalink($wp_query->post->ID);
    $args = array (
    ‘base’ => $mybase.$wp_rewrite->pagination_base.’/%#%/’,
    ‘format’ => ”,
    ‘total’ => $max_pages,
    ‘current’ => $page,
    ‘prev_text’ => ‘←’,
    ‘next_text’ => ‘→’,
    ‘mid_size’ => 1
    );
    return $args;
    }
    add_filter(‘bbp_topic_pagination’,’fix_pagination’); ?>`
    No luck, pagination dissapeard with this code.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.