Any idea on how to do this?? I’m trying to do the same.
@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.
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’); ?>
can someone pls post the code to achieve this using a filter in child theme functions.php
or maybe a style edit?
*EDIT* disregard…I used this to remove both
.bbp-pagination-count {
display: none;
}
Hi o.m.j,
CSS will not help you in this case, not even nth-child or things like
#bbpress-forums .bbp-pagination-count {
display: none;
}
#bbpress-forums .bbp-pagination-count ~ .bbp-pagination-count {
display: block;
}
will not work because the pagination is inside different divs and other elements.
The only possibility would be somewhere going for a javascript like
window.onload = function(){
document.getElementsByClassName('bbp-pagination-count')[0].style.display = 'none';
}
(not tested yet) or go for some coding.
Pascal.
unless I’m missing something…I added the below code to my child theme style.css & now pagination top & bottom is gone…
.bbp-pagination-count {
display: none;
}
Indeed, that is what you said and I repeated.
It will remove EVERY occurrence of the pagination count.
yes, I realize this as I originally stated…I don’t want any pagination shown.
Just in case anyone is looking to do this, I found a way to remove the pagination altogether (although not top and bottom independently).
Add the following to the functions.php
file in your active theme folder:
add_filter( 'bbp_get_forum_pagination_count', '__return_false' );