Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #165957
    lankyman26
    Participant

    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

    #165975
    Skandha
    Participant

    @lankyman26: Hello there,
    Please post in your site URL so that I can look into the issue.

    Kind Regards,
    Skandha

    #165983
    lankyman26
    Participant

    Hi. 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.com

    Thanks!

    #166076
    Skandha
    Participant

    @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,
    Skandha

    #166101
    lankyman26
    Participant

    Hi. 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!

    #166151
    Skandha
    Participant

    @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,
    Skandha

    #166188
    lankyman26
    Participant

    Hi. 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…

    #166208
    Skandha
    Participant

    @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,
    Skandha

    #166257
    lankyman26
    Participant

    Hi. 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?

    #166307
    Skandha
    Participant

    @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,
    Skandha

    #166566
    lankyman26
    Participant

    Hi. 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!

    #166627
    Skandha
    Participant

    @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,
    Skandha

    #166842
    lankyman26
    Participant

    That’s worked great. Thank you!

    #166892
    Skandha
    Participant

    @lankyman26: Glad I could help you out. Have a good day! 🙂

    Kind Regards,
    Skandha

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Can't remove sidebar on the hompage’ is closed to new replies.