Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Last replies on sidebar with

@ineken

Member

thank you for help.

I found the right file, I found the good part, I think it was leave I should use.

function widget( $args, $instance ) {

extract( $args );

$title = apply_filters( ‘bbp_replies_widget_title’, $instance );

$max_shown = !empty( $instance ) ? $instance : ‘5’;

$show_date = !empty( $instance ) ? ‘on’ : false;

// Query defaults

$replies_query = array(

‘post_status’ => join( ‘,’, array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),

‘posts_per_page’ => $max_shown,

‘order’ => ‘DESC’

);

// Set the query name

bbp_set_query_name( ‘bbp_widget’ );

// Get replies and display them

if ( bbp_has_replies( $replies_query ) ) :

echo $before_widget;

echo $before_title . $title . $after_title; ?>

    <?php while ( bbp_replies() ) : bbp_the_reply(); ?>

  • <?php

    $author_link = bbp_get_reply_author_link( array( ‘type’ => ‘both’, ‘size’ => 14 ) );

    $reply_link = ‘‘ . bbp_get_reply_topic_title() . ‘‘;

    /* translators: bbpress replies widget: 1: reply author, 2: reply link, 3: reply date, 4: reply time */

    printf( _x( $show_date == ‘on’ ? ‘%1$s on %2$s, %3$s, %4$s’ : ‘%1$s on %2$s’, ‘widgets’, ‘bbpress’ ), $author_link, $reply_link, get_the_date(), get_the_time() );

    ?>

  • <?php endwhile; ?>

<?php echo $after_widget;

endif;

bbp_reset_query_name();

}

I miss it more than learning how to change it: D

thank you I go little by little.

Skip to toolbar