Exclude current post when displaying recent posts in sidebar

Posted in: Newspaper
Post count: 53

hi guys, I’m having trouble trying to exclude the current post from ‘Recent Post’ block on the sidebar. How to get this work? -I’m using [tagDiv] Block 18.

Post count: 22421

Hi

This is a complex task which require lots of customizations in theme’s files and I can’t provide a solution now. You can find more details about td_api_plugin usage in our documentation: https://forum.tagdiv.com/practical-example-how-to-add-a-new-block-and-module/
Please consider that this task require good coding skills and if you can’t do it yourself my advice is to find someone to help you or hire a freelancer from sites like http://studio.envato.com/ to do it for you.

Thanks!

Post count: 7

Hi, great theme but the possibility to exclude the current post from the recent posts in a Newspaper should be a priority.
I’m trying with e function that works with the Wp Recent Posts, but I’m not able to make it work with the tagDiv widget:

function be_exclude_current_post( $args ) {
if( is_singular() && !isset( $args[‘post__in’] ) )
$args[‘post__not_in’] = array( get_the_ID() );
return $args;
}
add_filter( ‘widget_posts_args’, ‘be_exclude_current_post’ );

I think the problem should be in replacing ‘widget_posts_args’ with the right wording for for the tagDiv widget.

Any hint?

Post count: 7

Hi, great theme but the possibility to exclude the current post from the recent posts in a Newspaper should be a priority.
I’m trying with e function that works with the Wp Recent Posts, but I’m not able to make it work with the tagDiv widget:

function be_exclude_current_post( $args ) {
if( is_singular() && !isset( $args[‘post__in’] ) )
$args[‘post__not_in’] = array( get_the_ID() );
return $args;
}
add_filter( ‘widget_posts_args’, ‘be_exclude_current_post’ );

I think the problem should be in replacing ‘widget_posts_args’ with the right wording for for the tagDiv widget.

Any hint?

Post count: 20688

Hi,

I could not say if this is considered a propriety at the moment. Even the WordPress widget needs a custom function to achieve this. Maybe in will be considered at a later date, I cannot make any promises.
The theme blocks have filtering and sorting available, you could find a solution using default block options
https://forum.tagdiv.com/block-settings-tutorial/

Thanks

Post count: 7

Hi,
Unfortunately this is not helping. I was hoping to have a better support, like a function to add in my functions.php, instead to be redirected to an useless page.
From a big team like yours is a little bit disappointing.
Let me know if you are willing to solve this issue.
Bye, have a good day

Post count: 22421

Hello,

Please note that customization is not part of the theme support. We are not a big team, on the contrary, we are quite a small team and time does not allow us to tackle time consuming tasks so we cannot help with specific functions for customization. For this you will have to hire a freelancer to help out.

Thank you!

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.