Forum Replies Created
-
@netweb thanks for the reply
i might do that function if i cant get the exact function im looking fori did find an example of a bbpress forum using exactly what i want though
if you look at any other participant in the forum they do not have the topic author label
so its exactly what im looking for.
im trying to think of an idea of a function that would do that, but i have no idea how to make a function that does
if topic author is the same as reply author display label above reply author avatar, or below forum role. IF not the same dont display anything.
@robin-w hey thanks for helping me out
and i was using 5 pages as an example
i would like the topic starter label throughout a topic , for whatever number pages it may have
so should i basically use this
//This function adds the author to the reply function reply_display_author () { if( get_post_type() == 'reply' ) { echo '<span class="bbp-topic-started-by">' ; printf( __( 'Topic started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) )) ; echo '</span>' ; } else { return ; } } add_action ('bbp_theme_before_reply_content', 'reply_display_author') ;
with this function instead??
<?php if ( bbp_thread_replies() ) : ?> <?php bbp_list_replies(); ?> <?php else : ?> <?php global $countr ; $countr=-1 ; ?> <?php while ( bbp_replies() ) : bbp_the_reply(); ?> <?php $countr ++ ;?> <?php bbp_get_template_part( 'loop', 'single-reply' ); ?> <?php endwhile; ?> <?php endif; ?>
In reply to: bbpress topic breadcrumbs (yoast) messed up??Nevermind ill just remove the breadcrumbs from bbpress pages and style the bbpress breadcrumbs to be like my yoast ones
In reply to: How to display time ago on post date??Thank you this worked great
In reply to: How to display time ago on post date??forgot to mention the function im trying to change is in loop-single-reply.php
This is what i used
<div class="bbp-usr-location"><?php $bpProfileField = bp_get_profile_field_data( 'field=Location &user_id=' . get_the_author_meta( 'ID' ) ); if ( empty ( $bpProfileField) ): ?> <p></p> <?php else: ?> <p><?php echo 'Location: ' . $bpProfileField; ?></p> <?php endif; ?></div>
Nevermind i got it to work , plus that code i just posted is all out of wack , just some copy and pasting from other functions that worked
@robin-w worked like a charm, thank you very much for the help!
Yeah i have been using a child theme,
I havent put every file from bbpress in my child theme
Im just making small changes to the template files and only throw in the ones that i changed into my theme.
And i use my themes custom css plugin for css changes.
I really dont have anything to debug, i just have bits of php to try to make my desired function
Like i know
bbp_get_topic_freshness_link
, shows the time ago of the last postAnd that
<?php bbp_author_link( array( 'post_id' =>bbp_get_topic_last_active_id()
gets ahold of the author of the last post in a topic<?php printf( __( 'Last Post: %1$s'
lets me have my custom text with the attributes from the functionI just dont know how to put that all together to get the function that i want
Right now all in my function is
<?php do_action( 'bbp_theme_before_topic_started_by' ); ?> <span class="bbp-last-post-by-author"><?php printf( __( 'Last Post: %1$s', 'bbpress' ),bbp_get_topic_freshness_link( array() ) ); ?></span> <?php do_action( 'bbp_theme_after_topic_started_by' ); ?>