This topic has 4 replies, 3 voices, and was last updated 8 years by Radu.

  • Author
  • #43420
     tstrickland415
    Participant

    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?

    #43421
     tstrickland415
    Participant

    Sorry, totally forgot to reword the title before hitting Submit

    #43446
     Radu
    Moderator

    Hello,

    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 solution
    #77527
     raniele
    Participant

    Hello 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 advance

    #77828
     Radu
    Moderator

    Hi 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
Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?