Forum Replies Created
-
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' ); ?>