Filtering Related Articles At Bottom Of Post

Posted in: Newspaper
Post count: 20

Hi Guys, Thank you for your support.

Is there some method I can use to filter the Related Articles at the bottom of posts?
I couldn’t find any options in the (Theme Panel -> Post Settings) and wondered if this is possible?

Currently, I am trying to exclude a certain category from appearing under Related Posts…

Thanks.

Post count: 20686

Hi,

The Related articles section displayed on post pages will filter the posts by same category or same tag
https://forum.tagdiv.com/related-articles/
There is no option at the moment to exclude a particular category from this section, the posts displayed will be from a common category or tag with the post that you are on.

Thanks

Post count: 20

Hi Simion,

Ok, Thanks.
Assuming you are from the TagDiv Team, (Sorry I’m not exactly sure where to look yet), it would be extremely helpful if a feature like this was added in in future 🙂

Thanks.

Post count: 20686

Hi,

More customization options for the Related articles section may be added in future theme updates, but I could not say when exactly this will happen. At the moment those are the only settings in this regard.

Thanks

Post count: 20

Hi,

I was wondering is it possible to filter which posts are shown via custom code?

Thanks.

Post count: 20686

Hi,

That would require modifications to the theme files. This is where the related section is defined in the theme
https://www.screencast.com/t/P28HIhuW
You could try the solution from this topic and specify a category from which the posts will be displayed
https://forum.tagdiv.com/topic/related-articles-3/
Or disable the default Related section (through the theme panel, or comment the code in the post template) and insert a block through a shortcode, with the filtering you want
https://forum.tagdiv.com/topic/add-content-after-post-items-after-related-articles/
You could try it like this. Configure the block how you want it and use the code in te corresponding loop file with the post template used
https://www.screencast.com/t/HbCMxRAii
https://www.screencast.com/t/Rhu2nkHDNwIf
https://www.screencast.com/t/d8V5PwrCIv
https://www.screencast.com/t/pPx3KIirtQh6

<?php echo do_shortcode ('your shortcode here'); ?>

Thanks

Post count: 20

Hi Again,

I ended up editing the file td_module_single_base.php and your code worked like a charm! ?

‘category_id’ => ‘1’

While you are there, is it possible to randomize what posts are displayed like in the block settings via code?

Thanks!

Post count: 20686

Hi,

You could try something like this and see if it working properly
https://www.screencast.com/t/hrd2UjVQ

Thanks

Post count: 20

You Couldn’t Have Been More Perfect! Thank You Very Much!

Post count: 11

Siomion,

My related articles is populating old articles. Is it possible to display articles that most recent first?

Post count: 11

More specifically, I want to be able to do Latest Article + From same category

Post count: 20686

Hi,


@allongeorgia
That section is filtered by latest already, if you published posts with the category or tag (depending on the type of sorting you have) those would appear first as a related post is viewed.
I could take a look at an example of this issue, please provide a link to such a post.

Thanks

Post count: 161

Hi Simion,

I noticed my related posts are not filtered by latest. Is there a way to ad that sort option to td_module_single?

Post count: 20686

Hi,


@r1kay
I will inspect the issue you mention, provide a link to a post with the problem. I have tested this again. As soon as a post is published, it will appear in all post related articles sections. Of course that will happen only if it has at least one category or tag in common with it, depending on your settings.

Viewing 14 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic.