- This topic has 13 replies, 2 voices, and was last updated 5 years, 8 months ago by Skandha.
-
AuthorPosts
-
February 15, 2019 at 1:06 pm #165957lankyman26Participant
Hi. I’m just creating my site offline, but when I click the ‘no sidebar’ option on the homepage settings in Theme Options>Layout Options it puts a tick in there but nothing changes. The default no sidebar option works fine, but not the homepage one. Any idea why this might be? Thanks
February 15, 2019 at 10:56 pm #165975SkandhaParticipant@lankyman26: Hello there,
Please post in your site URL so that I can look into the issue.Kind Regards,
SkandhaFebruary 16, 2019 at 2:47 am #165983lankyman26ParticipantHi. I’m building it off line, but if you put this in your hosts file, you’ll see it…
217.194.210.98 free-city-guides.com
217.194.210.98 http://www.free-city-guides.comThanks!
February 17, 2019 at 11:35 pm #166076SkandhaParticipant@lankyman26: Hello there,
I checked your site and you don’t seem to be using WordPress and our theme. Please post your issue in the respective theme support forum.Kind Regards,
SkandhaFebruary 18, 2019 at 8:59 am #166101lankyman26ParticipantHi. The live site is using an old theme (atahualpa), but I am building a new site offline with your theme (Christmas Bell) at the server details I left. If you put those details in your host file in windows you should see it. I can’t think of another way to let you see take a look. Basically, the sidebar won’t switch off on the homepage even though the option is checked. It only works if I switch off the sidebar on the whole theme. Thanks!
February 19, 2019 at 1:13 am #166151SkandhaParticipant@lankyman26: All the Layout Options seems to be working fine at my end.
Homepage/Archive Layout is for archive pages and for homepage with you Latest Posts under Homepage Settings.
Can you recheck if the Layout Options are working?Kind Regards,
SkandhaFebruary 19, 2019 at 12:40 pm #166188lankyman26ParticipantHi. I have my homepage set to a static page rather than latest posts (my site doesn’t really use posts). So does that mean there isn’t a way to remove the sidebar with a static page? Thanks again…
February 20, 2019 at 12:17 am #166208SkandhaParticipant@lankyman26: If you have a static page rather latest post and to remove sidebar on that page you can
Go to => Appearance = Customize => Theme Options => Layout Options => Default Layout Check No Sidebar Option and Publish.Let me know if this is what you want!
Kind Regards,
SkandhaFebruary 20, 2019 at 11:01 am #166257lankyman26ParticipantHi. What I’m looking for is a way to remove the sidebar on the homepage but keep it on all the other pages. I thought the checkbox did that, but as you say, it only works with ‘latest posts’, not a static page. Is there a way to remove the sidebar only on the homepage?
February 20, 2019 at 11:46 pm #166307SkandhaParticipant@lankyman26: Hello there,
For that you will need to create a child theme and do a little bit of customization. Let me know if you are familiar with child theme customization so that I can guide otherwise I suggest you to hire a customizer.Kind Regards,
SkandhaFebruary 24, 2019 at 12:17 pm #166566lankyman26ParticipantHi. I’m pretty sure the ‘no sidebar’ option on the homepage used to work with a static/archive page in a previous release of Christmas Ball as that’s originally why I installed the theme. Anyway I’m not familiar with child themes I’m afraid, but I installed a plugin which has replaced the sidebar on the homepage with a blank space. The page is no longer central as a result however. Can you help with what kind of custom CSS I would need to make the homepage central again? Thanks!
February 25, 2019 at 2:41 am #166627SkandhaParticipant@lankyman26: I don’t think there was an option to remove sidebar only on Static Homepage. I am not able to access your site right now. You could do this using a Child Theme. That is what I would recommend. You can Generate Child Theme plugin to create a child theme. Activate and Install the theme. Then Go to => Dashboard => Generate Child Theme => => Select Parent Theme as Christmas Bell, fill the remaining fields and click Generate. This will create and activate the child theme. Now Go to => Child Theme Folder => functions.php and add the following Code.
remove_filter( 'body_class', 'christmasbell_body_classes' ); function christmasbell_child_body_classes( $classes ) { // Adds a class of custom-background-image to sites with a custom background image. if ( get_background_image() ) { $classes[] = 'custom-background-image'; } // Adds a class of group-blog to blogs with more than 1 published author. if ( is_multi_author() ) { $classes[] = 'group-blog'; } // Adds a class of hfeed to non-singular pages. if ( ! is_singular() ) { $classes[] = 'hfeed'; } // Always add a front-page class to the front page. if ( is_front_page() && ! is_home() ) { $classes[] = 'page-template-front-page'; } // Adds a class of (full-width|box) to blogs. if ( 'boxed' === get_theme_mod( 'christmasbell_layout_type' ) ) { $classes[] = 'boxed-layout'; } else { $classes[] = 'fluid-layout'; } // Adds a class of no-sidebar to sites without active sidebar. if ( ! is_active_sidebar( 'sidebar-1' ) ) { $classes[] = 'no-sidebar'; } // Adds a class with respect to layout selected. $layout = christmasbell_get_theme_layout(); $sidebar = christmasbell_get_sidebar_id(); if ( 'no-sidebar' === $layout || is_front_page() ) { $classes[] = 'no-sidebar content-width-layout'; } elseif ( 'right-sidebar' === $layout ) { if ( '' !== $sidebar ) { $classes[] = 'two-columns-layout content-left'; } } $classes[] = get_theme_mod( 'christmasbell_content_layout', 'excerpt-image-top' ); $classes[] = 'primary-menu-left'; $footer_left_content = get_theme_mod( 'christmasbell_footer_content_left' ); $footer_right_content = get_theme_mod( 'christmasbell_footer_content_right' ); if ( !( '' == $footer_left_content && '' == $footer_right_content ) ) { $classes[] = 'site-generator-two'; } return $classes; } add_filter( 'body_class', 'christmasbell_child_body_classes' );
This should remove the sidebar in static homepage.
Let me know if this works out!
Kind Regards,
SkandhaFebruary 27, 2019 at 11:54 am #166842lankyman26ParticipantThat’s worked great. Thank you!
February 28, 2019 at 12:27 am #166892SkandhaParticipant@lankyman26: Glad I could help you out. Have a good day! 🙂
Kind Regards,
Skandha -
AuthorPosts
- The topic ‘Can't remove sidebar on the hompage’ is closed to new replies.