Viewing 8 replies - 46 through 53 (of 53 total)
  • gentlemen, it works! ?? Thank you so much!
    If i can donate you some “beer” or two , just let me know where!

    a little problem was cursed in the first line: “reply to:…”
    my widget only shows “reply…”, so i looked at the code and changed the following line:

    $title = wp_trim_words( $title, 5, '...');

    to

    $title = wp_trim_words( $title, 35, '...');

    the full “reply to: + the topic ” appears on my page now.

    I hope it was the proper line, i modified ??

    Can i also put words like “New Topic” in front of my topics with no replies? (like its “reply to” at the recent replies)

    Thanks

    Hello again all.

    I came into this halfway and I’ve now seen this to mature into exactly what I wanted as well (Topics with no replies + recent replies).

    My question is, to implement this all I should need to do is:

    1. add the linked Gist in it’s entirety to my functions.php file.
    2. add the shortcode in the front-end where I want it

    Is that it or am I missing you need Query Wrangler plugin or something else?

    Very much appreciate your help.

    Thread Starter Ovidiu

    (@ovidiu)

    First of all you don’t need the plugin as it couldn’T quite do what we needed but the author has graciously helped us out in this thread ??

    As to how to proceed:

    1) copy the entire gist into your functions.php and edit where indicated with your preferences.
    2) Add the short-code where you want

    That should do the trick.

    alaskaav8r

    (@alaskaav8r)

    thank you greatly for this code, it really should be a plugin… I changed mine somewhat since there was some of it i didn’t want to display here is my code i placed in functions.php for child theme.

    <div class="bbpress-recent-reply-row <?php print $row_class; ?>">
    			<div><a href="<?php print get_permalink( get_post_meta( get_the_ID(), '_bbp_topic_id', true) ); ?>#post-<?php the_ID(); ?>"><?php print $title; ?></a></div>
    			<div><?php the_excerpt(); ?></div>
    			<div>by: <?php print bbp_user_profile_link( get_the_author_meta( 'ID' ) ); ?>   <?php print human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?></div>
    		</div>

    How do I control the length of the excerpt, say 10 words or so, maybe even put three dots and a read more like this …read more

    Also how do I put a space between the entries, I have them on a forum sidebar widget and they somewhat run together, in other words I need some vertical padding.

    thank you
    tim

    alaskaav8r

    (@alaskaav8r)

    I included an image showing what I am asking for with an additional question about how to code to get it to show hours:minutes until 24hrs has elapsed then display days. here
    well crap can’t get the link to work, it just goes back to beginning of page, so the image is at boatinghowtodotcom in downloads folder and is named bucksmenu.gif

    Plugin Author Jonathan Daggerhart

    (@daggerhart)

    Hi alaskaav8r,

    To add spacing, you need some CSS:

    .bbpress-recent-reply-row { margin-bottom: 16px; }

    To change the excerpt lengths, you need another hook:

    function my_custom_excerpt_length( $length ) {
    	return 20; // number of words
    }
    add_filter( 'excerpt_length', 'my_custom_excerpt_length', 999 );

    https://codex.www.ads-software.com/Plugin_API/Filter_Reference/excerpt_length

    Note: this will change your excerpt length site-wide. If you only want to change the excerpt length within this shortcode, it gets a little trickier.

    Hope this helps! I’m working on the plugin version of this gist. Coming soon! (or maybe a work-around to allow this in QW)

    alaskaav8r

    (@alaskaav8r)

    Thank you Jonathon, a plugin would be fantastic since some of us aren’t too code savvy.

    elucidateTX

    (@elucidatetx)

    Hello everyone. I’m loving this code…I had been looking for similar fuctionality, and I really hope this becomes as plugin as well.

    If I want to add in a line that returns the name of the forum the post or reply is in, what do I need to add? I’m not a coder, but I tried this with no joy:

    <div>Forum: <?php print bbp_get_form_forum_title( get_the_ID() ); ?></div>

    Thanks

Viewing 8 replies - 46 through 53 (of 53 total)
  • The topic ‘Need some help getting this right?’ is closed to new replies.