This topic has 5 replies, 2 voices, and was last updated 7 years by Laura.

  • Author
  • #171680
     creatureworks
    Participant

    Hello, I have created a custom post type “event” and am trying to control the layout of a single event post. Single event posts are currently showing post meta and a sidebar, both of which I do not want.

    In KLEO settings, I have the Main Layout set to No Sidebar. In the Blog settings, I have Single Post page Layout set to right sidebar (because I want a right sidebar in my Blog posts). It seems that my single event posts are using the same layout as the blog. How can I change the single event posts to use a full-width (no sidebar) layout?

    I have tried duplicating and editing content.php to content-event.php – in both my child theme and in the Kleo theme – and it does nothing. I also tried duplicating and editing single.php to single-event.php, again in both themes, but it does nothing. I must be missing something. Thank you in advance for your help!

     

    #171769
     Laura
    Moderator

    Hello, please try by adding this to style.css of child theme

    COPY CODE
    
    .sidebar.sidebar-main.col-sm-3.sidebar-right {
        display: none !important;
    }
    .template-page.col-sm-9.tpl-right.with-meta {
        width: 100%;
        border: none !important;
        float: none !important;
        margin: 0 auto !important;
    }
    .article-meta {
        display: none !important;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura 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 🙂

    #171951
     creatureworks
    Participant

    I know I could hide it with CSS, but that’s far from ideal. I was hoping for a more elegant solution.
    Can you advise why creating my own content or single template is not working?
    Or, is there is a way to enable layout options for my CPT in the theme settings?
    Thanks in advance.

    #171953
     Laura
    Moderator

    Hello, css its very easy to use, and fast, it shouldn’t be an issue, but if you need it to be done at the template file, i could take a look, i would need ftp access please 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura 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 🙂

    #172078
     creatureworks
    Participant

    We figured it out:
    Duplicate single.php to single-event.php in the child theme.
    Duplicate content.php to content-event.php in the child theme.
    Then, you must tell the single-event.php to call the content-event.php file:
    <?php get_template_part( ‘content-event’, get_post_format() ); ?>
    (This is not done automatically as a result of the naming convention as I previously assumed. It must be edited in the single-event.php file.)
    Posting in case it helps anyone else in the future!

    #172121
     Laura
    Moderator

    Glad you could resolve it! 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura 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 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?