-
Author
Tagged: php, child-theme, sidebars, custom post types
-
January 26, 2015 at 04:48 #43420tstrickland415Participant
Hello Kleo team,
Somehow the custom sidebars on some of my posts randomly gets reset to my default sidebar, so I’d like to know how to set a specific sidebar for every post of a certain Custom Post Type.
For example, I have a custom post type called “Events”. I also have a custom sidebar for this post type (that I created within the Kleo Theme) which has dynamic info related to each Event post. Normally I’d have to set the Sidebar when I create the post, which is easy but would be much easier and full-proof to do so programmatically in my child theme. What can I add to my single-events.php to set/force the same sidebar for all posts of this post type?
January 26, 2015 at 04:51 #43421tstrickland415ParticipantSorry, totally forgot to reword the title before hitting Submit
January 26, 2015 at 14:21 #43446RaduModeratorHello,
Install and use this plugin https://wordpress.org/plugins/content-aware-sidebars/
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 14, 2015 at 15:01 #77527ranieleParticipantHello Radu,
I’m replying to this thread beacuse I think I am quite in the same siituation.
I have created a custom post type and made a single-mycpt.php for it, which has been added to Kleo Child.I would need to have one specific sidebar only on that particular post type, but despite content-aware-sidebars, there seems to be no way to even display any sidebar with said cpt.
I would really appreciate any help. Thanks in advanceSeptember 15, 2015 at 16:45 #77828RaduModeratorHi Raniele,
That plugin it should works.. but you can try this plugin to
https://wordpress.org/plugins/custom-sidebars/screenshots/It should works.
Regards
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.