Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, great plug-in. I would like to second this. I use it as 2 widgets to display recent posts in a couple of categories. It would be great if the post being viewed could be excluded if it happens to be a recent post and the next newest one is displayed instead. is this possible either now or as an upgrade request for consideration?

    Plugin Author DaveE

    (@dpe415)

    Hi whoaloic & Paul,

    At this time, the plugin doesn’t offer this feature. You could use the query args filter, $args = apply_filters( 'dpe_fpw_args', $args ); to filter out the current item, but it would require some coding on your part.

    I’ll add it to the suggestion list for future consideration. Thanks!

    Hi Dave, thank you for the heads up on the filter. This snippet does the trick for my situation…

    function current_recent_post( $args ) {
    	if( is_singular() && !isset( $args['post__in'] ) )
    		$args['post__not_in'] = array( get_the_ID() );
    
    	return $args;
    }
    add_filter( 'dpe_fpw_args', 'current_recent_post' );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Eclude current post in the list’ is closed to new replies.