November 1, 2016 at 14:56 UTC - Views: 69 #19688EmmanuelParticipant
Been trying to work something out for some time now but have to finally admit defeat at present!
I want to have a number of show posts pages, and on each of those pages, I want to have a widget in the righthand sidebar for ‘Recent Posts’ but to ONLY show recent posts for a particular category. I don’t want to show the category there as if they click that it takes them to the wordpress category page …and I want them to stay on the weaver show posts page. I would ideally like them to stay on that page even when they click to read the article, so that while they are on that ‘niche-topic’ weaver page, they always have the same righthand sidebar which is focussed only on the relevant post links.
I do not know if this is possible or not …at present I have just done a test with a secondary menu inside the widget but – as explained above – when they click on that it takes them to the wp category page …without the right hand, niche focused, sidebar. Is there any other way I could accomplish this?
Many thanks in advanceNovember 1, 2016 at 18:43 UTC - Views: 22 #31387scramblerModerator
If you want to show the titles of recent posts of a specific category inside a widget, do the following.
Create a filter that selects posts from the category you need
Set them to display as title only
Set how many you want to show.
Then, in the per page widget area you are using, drop a Text widget, and add the show posts shortcode corresponding to the filter you created above
This will list the titles of the last few posts in that category, instead of going to an archive page.
That said, when people click on a post title, it will take them to the single post page of that post which will have the generic sidebar and widgets.
To get the same specialized widget to appear inside the Single posts page sidebar, could prove complicated.
Adding the widget to all single post pages could be easily done with a plugin like Dynamic widget that would set that widget to be on single post pages. But I suspect you would only want that widget on posts of that specific category, and I cant see an easy way to automate that.
That said I have not looked at dynamic widgets in detail, so you may want to have a look, in case they can differentiate single post pages by category.
If they do, then you could put your widget in the common sidebar widget area, and just use dynamic widget to make it visible only on single post pages of that category.November 1, 2016 at 19:54 UTC - Views: 3 #31388EmmanuelParticipant
That sounds good …I will have to work out how to do all those things but am optimistic! Many thanks for your very helpful reply – and hope I won’t be coming back here, fingers crossed 🙂
- You must be logged in to reply to this topic.