Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change “Posts” to “Replies” in topic header


  • enkoes
    Participant

    @enkoes

    Hi, I would like to change “Posts” in topic header to “Replies”. May I know how to do that?
    See screenshot: https://paste.pics/L6821

    Also, I’d like to adjust font size of items in topic header, can you provide the CSS guides?

    Regards

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

  • Robin W
    Moderator

    @robin-w

    bbp style pack

    lets you style your forums

    you can also use the translations tab of this to change Posts to Replies

    there is also

    bbPress Styling Crib

    which contains styling guides


    Robin W
    Moderator

    @robin-w

    bbp style pack

    lets you style your forums

    you can also use the translations tab of this to change Posts to Replies

    there is also

    bbPress Styling Crib

    which contains styling guides


    enkoes
    Participant

    @enkoes

    I found that “Posts” in the header having meaning “total posts (INCLUDING the starter post”.
    But “Replies” means “total number of replied posts (EXCLUDING the starter post)”.

    Since both terms carry different meaning, mere translation from “posts” to “replies” will add to confusion. Do we need to add/edit the php files for this change?


    Robin W
    Moderator

    @robin-w

    the templates are in bbpress/default/bbpress

    you would be looking at things starting loop-xx , so for instance if you wanted to change loop-single-reply.php …

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.php

    transfer this to your pc and edit

    and save

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-single-reply.php

    bbPress will now use this template instead of the original


    enkoes
    Participant

    @enkoes

    Hi Robin, after spent some time trying to understand the codes, I tried and finally got the results that I wanted.

    For loop-topics.php,
    I change:

    <li class="bbp-topic-reply-count"><?php bbp_show_lead_topic()
    				? esc_html_e( 'Replies', 'bbpress' )
    				: esc_html_e( 'Posts',   'bbpress' );
    			?></li>

    to:
    <li class="bbp-topic-reply-count"><?php esc_html_e( 'Replies', 'bbpress' ); ?></li>

    and for loop-single-topic.php,
    I change:
    <li class="bbp-topic-reply-count"><?php bbp_show_lead_topic() ? bbp_topic_reply_count() : bbp_topic_post_count(); ?></li>
    to:
    <li class="bbp-topic-reply-count"><?php bbp_topic_reply_count(); ?></li>

    Since I don’t have any knowledge about PHP codes, I’m not sure what I did is correct or not, anyway at least work on my browser.

    Regards


    Robin W
    Moderator

    @robin-w

    🙂

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