-
Author
-
August 24, 2017 at 23:59 #171680creatureworksParticipant
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!
August 26, 2017 at 08:55 #171769LauraModeratorHello, 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 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 🙂
August 28, 2017 at 18:29 #171951creatureworksParticipantI 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.August 28, 2017 at 18:39 #171953LauraModeratorHello, 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 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 🙂
August 30, 2017 at 00:38 #172078creatureworksParticipantWe 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!August 30, 2017 at 17:39 #172121LauraModeratorGlad 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 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 🙂
-
AuthorPosts
You must be logged in to reply to this topic.