-
AuthorPosts
-
December 3, 2014 at 3:26 am #157259
I have the Ethos stack and I want to add a sidebar just to blog posts theme but I’m having trouble because the masonry view wont let me do it without having sidebars on the index page and archive pages. I just want a sidebar only on the posts. How do I do that? There isn’t any options and I’m not finding any help about it with the child themes.
I’ve added my own CSS to this page to show an example of what I’m looking for. I can’t have a real sidebar because I can’t add divs from the CSS panel.
http://hankami.com/2014/12/litostarr-new-mixtape-sagittarius/December 3, 2014 at 7:02 am #157382Hi,
Thanks for writing in!
Because this requires a template change, Iβd advise that you setup a child theme. This allows you to make code changes that wonβt be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
After setting up a child theme, create file wp-single.php in wp-content\themes\x-child-ethos\framework\views\ethos
and copy the code below into that file.<?php // ============================================================================= // VIEWS/ETHOS/WP-SINGLE.PHP // ----------------------------------------------------------------------------- // Single post output for Ethos. // ============================================================================= $fullwidth = get_post_meta( get_the_ID(), '_x_post_layout', true ); ?> <?php get_header(); ?> <div class="x-container-fluid max width main"> <div class="offset cf"> <div class="x-main left" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php x_get_view( 'ethos', 'content', get_post_format() ); ?> <?php x_get_view( 'global', '_comments-template' ); ?> <?php endwhile; ?> </div> <?php get_sidebar(); ?> </div> </div> <?php get_footer(); ?>
Hope that helps. π
February 3, 2015 at 6:13 pm #198434Hi, I did this very thing for the Integrity theme (changing the code to reflect such) and I see no way of having a sidebar that operates on posts only. What am I missing? Does the code need to reflect Integrity-light? π
Site: http://obministries.wpengine.com
Thanks
February 3, 2015 at 6:25 pm #198439This apparently also broke the SumoMe highlighter, it only works sometimes.
February 4, 2015 at 5:40 am #198740Hi there,
Please ignore above code and add the following CSS under Customize -> Custom -> CSS :
.blog .x-sidebar { display: none; } .blog .x-main { width: 100%; }
Hope it helps.
February 4, 2015 at 2:26 pm #199109Ha ha, this code made the sidebar on main landing page disappear. π I removed it. What I want to do is to be able to display a sidebar that is different from the one on the landing page and only displays on posts, no pages. Is this possible?
Thanks for replying.
February 4, 2015 at 9:38 pm #199403Hey there,
That is possible. Please see https://theme.co/x/member/kb/unlimited-sidebars/ to learn how to setup different sidebars. Your Content Layout must be set to Content Left, Sidebar Right or Sidebar Left, Content Right and your Blog Layout must be set to Use Global Content Layout. For your pages not to have a sidebar, you must choose a page template that has no sidebar. The default page template will have a sidebar in this case because it’ll get the setting of the Content Layout.
Hope that helps. π
February 5, 2015 at 8:17 pm #200158OK thank you, will see what I can do. π
February 6, 2015 at 8:17 am #200480Let us know how it goes π
July 13, 2015 at 4:56 pm #329126Selecting a no sidebar default template should still allow you to select a sidebar template for specific pages. It’s unconventional to require custom templates for such a common setup, and confusing to allow such a setup with no explanation as to why the sidebar doesn’t show when a sidebar containing template is selected for a specific page.
July 13, 2015 at 9:18 pm #329291Hello There,
We have to choose Content Layout with sidebar on the Global settings so we can use a page template with sidebar. And then you can still set other page layout template to be fullwidth in case you don’t want to show the sidebar on specific pages. On pages template we can also select an opposite sidebar. On other hand, selecting fullwidth on the global settings then Content Layout with sidebar on the template page won’t work. I will raise you’re issue with this to our developers.
Hope this helps.
December 9, 2015 at 9:32 am #699313Hi there. Is there any progress in providing us with a solution that will be displaying a sidebar just on posts and not the archive or home page? As said before it seems to be a basic requirement for a magazine-style template.
CheersDecember 9, 2015 at 12:37 pm #699586Hi @dlist
We certainly appreciate the feedback! This is something we can add to our list of feature requests. This way it can be taken into consideration for future development. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive. Thanks!
January 30, 2016 at 2:06 pm #772221I have to say, it doesn’t make a lot of sense to put only one defining option on the Blog settings in the Customizer (which is what happens when you choose Full Width under Layout and Design).
The Blog NEEDS to have the “Sidebar Left, Content Right” and “Content Left, Sidebar Right” options just like the Layout and Design Customizer options have (which equates to the Global Content Layout setting).
Many sites these days do not have a sidebar for the overall layout. So having “Use Global Content Layout” and “Full Width” as your only Blog options is superfluous.
Please bump this on your feature requests!
Thanks!
January 31, 2016 at 2:49 am #772735Hey @visionmule,
Thanks for the feedback! Yes we have forwarded this thread to our developers and will be taken into considerations for future enhancements of the theme. Please bear with us.
Best Regards.
-
AuthorPosts