Skip to:
Content
Pages
Categories
Search
Top
Bottom

and tags added automatically, everywhere…


  • kodacollider
    Participant

    @kodacollider

    Hello. I’ve noticed throughout all of my bbpress pages there are a lot of <br> and <p> tags inserted, such as those by wpautop, but in places where they should not be.

    I’ve gone and changed a lot of elements manually to get rid of as many of these as possible, but I’m kind of stumped on pagination. Each of the anchors in my bbpress pagination has a <br> between them, placing the pages in a vertical line rather than a horizontal one.

    Any idea on this — is there anything I can do to get rid of these extra <br> tags?

Viewing 12 replies - 1 through 12 (of 12 total)
  • I think a link to the site showing it would be easier for us to help.
    Pascal.


    kodacollider
    Participant

    @kodacollider

    I’m not able to link to the site directly right now, unfortunately, but this is what the source looks like for the pagination area:

    <div class="bbp-pagination-links">
    <p>	<span class="page-numbers current">1</span><br>
    <a class="page-numbers" href="https://www.com/topic/test-1/page/2/">2</a><br>
    <a class="next page-numbers" href="https://www.com/topic/test-1/page/2/">→</a>
    </p></div>

    This is the pagination for a list of topics, right ? (and not for the search).

    EDIT: and you did NOT copy a bbPress template into your own (child) theme but use the standard php files ?

    If you could confirm the above ?
    And then, if you put the below in your functions.php, what do you get ?

    function casiepa_custom_pagination( $args ) {
    	$args['type'] = 'list'; // try also 'plain'
    	$args['after_page_number'] = '&nbsp;';
    
    	return $args;
    }
    add_filter( 'bbp_topic_pagination', 'casiepa_custom_pagination' );

    kodacollider
    Participant

    @kodacollider

    This is not from the search, though I wouldn’t be surprised if it does the same thing there as well. It does it for the pagination for a list of topics, yes, but also for the list of replies when viewing a topic (and when listing pages of a topic beneath the topic title when viewing a forum).

    I am using child theme files. However, I see the pagination functions defined in:

    /wp-content/plugins/bbpress/includes/topics/template.php
    /wp-content/plugins/bbpress/includes/replies/template.php

    etc… and those files, of course, are not among my child theme files.

    I tried your function, and it did add a space after each page number (though inside the anchor tag, not after it). It didn’t, however, removed the <br> tags. I tried plain as well as list, as commented.

    Thanks for your help so far.


    kodacollider
    Participant

    @kodacollider

    Any other ideas, by chance?

    Unfortunately not.
    Do you have the possibility to switch to a standard wordpress theme ?
    Or deactivate all plugins except bbPress ? Then reactivate one by one
    Pascal.

    I just had something with exactly the same issue. Are you using the flatsome theme ?

    Pascal.


    kodacollider
    Participant

    @kodacollider

    I’m not, I am using a child theme of Twenty Twelve that I’ve been creating.

    I actually got this figured out, on a whim I decided to try your $args[‘type’] = ‘list’; again and for whatever reason this time it worked. I don’t know if I may have just overlooked it the first time, or what.

    My function:

    function bbp_custom_pagination_links( $args ) {
        $args['type'] = 'list';
        return $args;
    }
    add_filter ('bbp_topic_pagination','bbp_custom_pagination_links');

    I will still have to go through and do the same thing for other instances of pagination within bbPress, but that has worked for the topic list. It’s just a matter of styling the list elements with CSS at that point to get them aligned horizontally.

    Thanks for all of your help, I really do appreciate it.

    Great, glad to hear!


    kodacollider
    Participant

    @kodacollider

    I got the pagination for topics and for replies above/below each respective loop working, but I can’t seem to find out how to hook into this one to apply the same effect:

    That’s the pagination for topic replies listed right beneath the topic’s title when viewing a single forum.

    Any ideas?

    Not really… sorry

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