Add Specific Post in "Related Posts"
Post count: 15chethanthimmappaOctober 11, 2018 at 3:08 pm #38103
I would like to add a specific article in the related posts section under single post option related to it – How can I do that?
Currently the related posts is showing all posts in the category – How can i add a specific related post manually?
Chethan ThimmappaPost count: 267FerdyOctober 12, 2018 at 11:42 am #38144
At the moment we don’t have the feature. in this case, you need to do some change in the code. may I know do you mean inline related post or bottom related post?
Thank youPost count: 15chethanthimmappaOctober 12, 2018 at 12:10 pm #38147
Thanks for your response.
Anything is fine. If you provide that feature in Bottom Related Post, it should be good. Along with my previous theme i used this plugin called – “Author Recommended Post” – https://wordpress.org/plugins/author-recommended-posts/
Where the plugin allowed me to select any of the articles which I think will be useful for my readers.
Now, the JNews theme is pretty nice and I love the related posts section it loads blazing fast – however I miss this very important functionality of suggesting posts to our readers . I will have to link them manually through links without this functionality.
Chethan ThimmappaPost count: 10693AdekOctober 12, 2018 at 2:17 pm #38153
Hi Chethan Thimmappa,
Regarding this thing, you may need to do some changes as my partner suggestion above. In this case, i recommend you to use JNews child theme in order to avoid losing the changes that you made when doing theme update. Please check our documentation here about using JNews child theme http://support.jegtheme.com/documentation/child-theme-3/.
First, you need to create this file
wp-content/themes/jnews-child/class/Single/SinglePost.php. Then jump into line 1171 and add this code1$attr['include_post'] = '12,34,56'; // insert post ids separate by comma
. It will looks like below:12345678$name = 'JNews_Block_' . get_theme_mod('jnews_single_post_inline_related_template', '29') ;$name = jnews_get_view_class_from_shortcode( $name );$attr['include_post'] = '12,34,56'; // insert post ids separate by comma/** @var $content_instance BlockViewAbstract */$content_instance = jnews_get_module_instance($name);$result = $content_instance->build_module($attr);
Do the same thing again on line 1065. Let me know if you need further help in there.
Thank youPost count: 15chethanthimmappaOctober 12, 2018 at 2:30 pm #38157
Thanks. This looks like the post IDs 12,34,56 becomes a universal related post across all posts. Anyway we can define related post for particular post only?
Example: I would like to suggest Volkswagen Ameo Specifications, Available variants etc under Volkswagen related news only.
I observe you have something like filter by TAG. I am thinking If I can define a unique tag and group all articles together and use. Anyways thanks for the help.Post count: 267FerdyOctober 12, 2018 at 5:02 pm #38174
yes, it possible. but it takes a lot of change, we will consider to adding this feature on the future.
You must be logged in to reply to this topic.