Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re-arrange display of replies data


  • Pamela Keogh
    Participant

    @pamela-keogh

    Hi

    I’m very new to WordPress, bbpress and php. I am currently working on a project and am finding it very difficult to find which file I need to change. I would like to re-arrange the order that author details are displayed in replies but cannot find where this is.

    I would like the text to appear first and the avatar after and maybe remove the name and role.

    I am using wordpress-4.2.2 and bbpress.2.5.7

    Any help appreciated

    Pamela

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

  • Robkk
    Moderator

    @robkk

    You copy the loop-single-reply.php file in your child theme in a folder called bbpress.

    when you look at the code of theme template in your code editor, you will see an tag called

    <?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>

    This peice of code has attributes to display your avatar and user role. You can place similar code around each other to reorder it to the layout you want.

    For more information about cusotmizing the reply author link see here.

    bbp_reply_author_link

    Also I think you can reorder the reply content to show up first with CSS and just switch it around in the template file.


    Pamela Keogh
    Participant

    @pamela-keogh

    Thanks, I was able to re-arrange but now I would like every second reply to show in a different colour but cannot get this to work. Any ideas?


    Robkk
    Moderator

    @robkk

    Customize this CSS from bbPress.

    #bbpress-forums div.even,
    #bbpress-forums ul.even {
    	background-color: #fff;
    }
    
    #bbpress-forums div.odd,
    #bbpress-forums ul.odd {
    	background-color: #fbfbfb;
    }

    Pamela Keogh
    Participant

    @pamela-keogh

    I’ve tried this and nothing changes. It’s the bbp-reply-content that I want to change colour so not sure is that the problem


    Robkk
    Moderator

    @robkk

    Link to a random topic on your site so I can give you some specific CSS for your site. You may also just add !Important to the CSS to see if that works too.


    Pamela Keogh
    Participant

    @pamela-keogh


    Robkk
    Moderator

    @robkk

    You might have removed/there isn’t a certain piece of code that renders the classes for each topic/reply.

    You might be missing this in loop-single-reply.php in your custom templates that you placed in your child theme.

    <?php bbp_reply_class(); ?>

    Maybe this for topics too in loop-single-topic.php

    <?php bbp_topic_class(); ?>

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