Skip to:
Content
Pages
Categories
Search
Top
Bottom

Help with reply topics header


  • Clivesmith
    Participant

    @clivesmith

    I am sorry to ask this now as I know you are busy with a great update but I do have a bit of a problem.

    I managed to sort most of it out with the old version but am struggling with the new update.

    What I did was remove from the header on the replies page all the headings except “author” and change the “posts” to text I want with some formatting.

    in my childtheme style.css
    I included this to remove most of the headings from everywhere.

    #bbpress-forums li.bbp-body ul.forum, #bbpress-forums li.bbp-body ul.topic {
    border-top: 3px solid #0a9ed3;
    overflow: hidden;
    padding: 8px;
    }

    li.bbp-forum-freshness, li.bbp-forum-freshness {
    display: none;
    }

    li.bbp-forum-freshness, li.bbp-topic-freshness {
    display: none;
    }

    li.bbp-forum-info, li.bbp-topic-title { width:100%; }

    li.bbp-forum-topic-count, li.bbp-forum-topic-count {
    display: none;
    }
    li.bbp-forum-reply-count, li.bbp-forum-reply-count {
    display: none;
    }
    li.bbp-topic-title { width:100%; }

    li.bbp-topic-voice-count, li.bbp-topic-voice-count {
    display: none;
    }

    li.bbp-topic-reply-count, li.bbp-topic-reply-count {
    display: none;
    }

    I know this next bit was a dirty way to do it but…
    in wp-content/plugins/bbpress/templates/default/bbpress/loop-replies.php
    I changed line 24 from
    <?php _e( ‘Posts’, ‘bbpress’ ); ?>
    to
    <?php _e( ‘<div align=”center” style =”color:#ff0000″>Please check out all the replies below,<br> if you find a post helpful please vote using the arrows</div>’, ‘bbpress’ ); ?>

    which put in my text in red centered with a carriage return in the middle.

    If I do the same now, I cannot put formatting in. But also I realized that the “author” label is not needed, in fact it looks totally wrong with a mobile.
    You can see what I mean if you look at this page https://wateratairports.com/topic/london-gatwick-lgw/ with both a large screen and a mobile
    Could someone help please ?

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

  • Robin W
    Moderator

    @robin-w

    ok, the message in red show what I think is fine on my browser – can you say if you still have an issue with that part.

    On the mobile, you could have

    @media only screen and (max-width: 600px) {
    
    #bbpress-forums .bbp-reply-author {
    	display	: none ;
    }
    
    }

    which would take the author part out for mobiles


    Clivesmith
    Participant

    @clivesmith

    Thank you Robin,

    I don’t think I made myself clear about the red wording, what you see now with me still using version 2.5.14. your rewrite of the loop-reply.php changed the line <?php _e( ‘Posts’, ‘bbpress’ ); ?> where I added my words and formatting to esc_html_e( ‘Posts’, ‘bbpress’ ); which is where I cannot get the formatting into.

    I am still using 2.5.14 because the subforums are still not showing up, on my home page that is all the counties.

    I will change the mobile bits later as I am on my way out for coffee !!

    Clive


    Robin W
    Moderator

    @robin-w

    ok change

    <div class="bbp-reply-content"><?php bbp_show_lead_topic()
    			? esc_html_e( 'Replies', 'bbpress' )
    			: esc_html_e( 'Posts',   'bbpress' );
    		?></div><!-- .bbp-reply-content -->

    to

    <div class="bbp-reply-content"><?php bbp_show_lead_topic()
    			? esc_html_e( 'Replies', 'bbpress' )
    			: _e( ‘<div align=”center” style =”color:#ff0000″>Please check out all the replies below,<br> if you find a post helpful please vote using the arrows</div>’, ‘bbpress’ ); 
    ?></div><!-- .bbp-reply-content -->

    You should really put this file into a child theme if you have one

    so you would do the following

    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 upload the new file to this directory so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-replies.php
    bbPress will now use this template instead of the original


    Clivesmith
    Participant

    @clivesmith

    Thanks again Robin, I know I should put these in my child theme, I just worry that a update will alter the original file and I do not notice it. That sorted out the formatting perfectly.

    The change you gave me for the for the mobile replies

    @media only screen and (max-width: 600px) {

    #bbpress-forums .bbp-reply-author {
    display : none ;
    }

    }
    takes out all the author info including in the replies, I just want to remove the author title and release the space so my text can move over.

    Regards
    Clive


    Robin W
    Moderator

    @robin-w

    try this

    #bbpress-forums li.bbp-header .bbp-reply-author {
    display : none ;
    }

    Clivesmith
    Participant

    @clivesmith

    Thank you, I thought it was not working but had a cache problem.

    Thanks again


    Robin W
    Moderator

    @robin-w

    no problem – glad you are fixed !

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