Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove top pagination but keep bottom


  • demonboy
    Participant

    @demonboy

    Mildly baffled by this. I’m trying to remove the pagination at the top of the forum topic page but leave it at the bottom (see here for an example). I can remove both by commenting out the code in pagination-topics.php, or I can remove both with display:none, but how do I remove the top one and not the bottom one? They share exactly the same properties.

    Thanks,

    Jamie

Viewing 3 replies - 1 through 3 (of 3 total)

  • Suntura
    Participant

    @suntura

    Any idea on how to do this?? I’m trying to do the same.


    Robkk
    Moderator

    @robkk

    @suntura

    you have to wrap the loop with pagination code and divs manually

    like for example in content-single-forum.php, around the loop originally has the get template pagination kind of code, you have to replace the first one above the loop with the php code for the count, and the below with the pagination links.

    like this.

    <div class="bbp-pagination-count">
    
    		<?php bbp_forum_pagination_count(); ?>
    
    	</div>
    
    			<?php bbp_get_template_part( 'loop',       'topics'    ); ?>
    
    <div class="bbp-pagination-links">
    
    		<?php bbp_forum_pagination_links(); ?>
    
    	</div>  

    you have to make sure you are choosing the right pagination set up for each content single file template.

    also make sure you have copied the templates over to your child theme so you can edit them with no problem.


    Shinbat
    Participant

    @shinbat

    Simply, all you need to do is commenting a line in ‘content-archive-topic.php’ as shown below:
    The file path is ‘..\wp-content\plugins\bbpress\templates\default\bbpress\content-archive-topic.php’ at around line number 30.

    <?php bbp_get_template_part( ‘pagination’, ‘topics’); ?>
    <?php bbp_get_template_part( ‘loop’, ‘topics’); ?>
    <?php bbp_get_template_part( ‘pagination’, ‘topics’); ?>

    Just comment the first line to avoid displaying top pagination link as:

    <!—- ?php bbp_get_template_part( ‘pagination’, ‘topics’); ? —–>
    <?php bbp_get_template_part( ‘loop’, ‘topics’); ?>
    <?php bbp_get_template_part( ‘pagination’, ‘topics’); ?>

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