-
Author
-
October 28, 2016 at 02:29 #141803geo7thqueenParticipant
the Widget (Kleo) Recent Posts has a “Show From Category….” option, which is fine if you want to add a fixed category.
Is there a way to use (Kleo) Recent Posts to query the page to determine the category of the post, and then just list posts from the same category? (I think this is what is “Related Posts” elsewhere?).
Picking a static category is fine, but one would have to create different widgets by hand for each category and remember to add when any new categories are created.
I’d rather just use one widget and have (Kleo) Recent Posts dynamically select the content based on the category of the page.
Thanks in advance for any insight!
October 28, 2016 at 13:23 #141863LauraModeratorHello, i understand what you mean, but that is not available right now, you could do this by editing the category archive and adding visual composer shortcodes with php to automatically fill the category id with the current category page. I am sure a developer could do that fr you easily 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
May 17, 2017 at 19:04 #161743LindaK816ParticipantHi I also would like to do this. Did you provide geo7thqueen with the php, etc. to do this?
Thank you!
LindaKMay 17, 2017 at 20:59 #161767geo7thqueenParticipantLindaK816 –
The team here is quite good, and often I’m expecting an answer that points me a documentation, and instead I get the surprise that one of the admins just wrote out a code snippet to help. But in this case I think it was too complicated for a quick block of code.
I went ahead and just wrote a widget. I was doing enough other stuff to the CPT that I was having to do a lot of PHP for this.
Looks like Laura’s suggestion might have been easier, but again my requirements went beyond just the dynamic Recent post of the same category request.
But it would have been simpler if there was a built-in solution, and it didn’t hurt to ask before “re-inventing the wheel” (as it seems there is a bit of Kleo that isn’t in the documentation).
As you are at least a second person that feels this would be helpful, and it’s not just me, I’d suggest that you go to the feature requests and submit this. Although I have my solution, I’d gladly second your vote, as I know, if at least 2 of us are vocal enough to need this, I’d bet that there are more people out there that would find use for this.
May 17, 2017 at 21:42 #161771LindaK816ParticipantHi geo7thqueen – thanks for your reply. I’m impressed that you wrote a widget – I’m afraid that is (probably) beyond me so I will have to suffer until they provide a shortcode for this feature. I will put in a feature request as you suggested – hopefully that will help. I’ve used the WP premium theme Charity Hub and all I needed to do was use a simple shortcode and it was perfect to separate my posts by category.
Thanks again for your insights,
LindaK -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.