Skip to:
Content
Pages
Categories
Search
Top
Bottom

Just a few bbPress Questions


  • CucumberandCompany
    Participant

    @cucumberandcompany

    – WordPress Version: 4.8
    – bbPress Version: 2.5.13
    – Forum URL: HotRodForums.net

    – I’m wanting to move the Edit/Move/Split/Post bar down below the content of the post, and was wondering what theme template I would need to modify for that.

    – Is there a way to have the join date underneath their photo beside the post? We’re wanting to move the post date over to the main box, and have the author’s join date where that was.

    I know you all don’t do custom work, so we’re just looking into being pointed in the right direction.

    Thank you for your time!

Viewing 1 replies (of 1 total)

  • Robin W
    Moderator

    @robin-w

    1.

    I’m wanting to move the Edit/Move/Split/Post bar down

    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

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.php
    Make a copy of this file, 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-forum.php
    bbPress will now use this template instead of the original
    and you can amend this

    then around line 29

    <?php do_action( 'bbp_theme_before_reply_admin_links' ); ?>
    
    		<?php bbp_reply_admin_links(); ?>
    
    		<?php do_action( 'bbp_theme_after_reply_admin_links' ); ?>

    this is the bit you are wanting to move.

    2.

    Is there a way to have the join date underneath their photo beside the post?

    yes it can be done, but would need some coding.

    Same template, around line 57 you’ll find

    <?php do_action( 'bbp_theme_after_reply_author_details' ); ?>

    That’s where you want to add the join date, either as a hook to the action above, or as additional code.

    I suspect you’ll want to pick up the date from the wp_posts table user_registered field.

    using bbp_get_reply_author_id() should get you the user, and

    https://codex.wordpress.org/Function_Reference/get_userdata

    should give you how to use it, with say

    <?php $user_info = get_userdata(bbp_get_reply_author_id() );
          $registered = $user_info->user_registered;
          echo $registered?>

    probably being close to what you want, but you’ll probably need to do some date stuff to display how you want

    https://www.w3schools.com/php/php_ref_date.asp but possibly a strtotime() function

    Hopefully that’s enough to get you somewhere !!

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