widget to display related posts in wordpress

127 Views Asked by At

I starting a blog where I have this structure for my posts: for each post published in the category MAIN, i have 3-4 others posts in the categories A,B,C... which are related to the former.

I want add a widget to display the post of the categories A,B,C..., this way:

  • if the widget is displayed in the start page, the posts related to more recent post published in the category MAIN are listed;

  • if the widget is displayed in the post page, the posts related to this post are listed.

anyone knows how to accomplish that? where I should put the code for this widget? what wordpress variables are used?

0

There are 0 best solutions below