Support » Developing with WordPress » Sidebar and main content won’t load at same time (custom theme)

  • I’m sure i’m just missing something in the code, it’s my first time trying to use a sidebar. Either the sidebar or main content load, but never at the same time (depending on how i change my code). Most of the time it’s the sidebar that doesn’t load. URL is


    <?php get_header(); ?>
    <?php get_sidebar(); ?>
    <?php get_template_part( 'content', get_post_format() ); ?>
    <?php get_footer(); ?>


    if ( ! is_active_sidebar( 'sidebar-1' ) ) {
    <div id="secondary" class="widget-area" role="complementary">
    	<?php dynamic_sidebar( 'sidebar-1' ); ?>


    function arphabet_widgets_init() {
    	register_sidebar( array(
    		'name'          => 'sidebar-1',
    		'id'            => 'sidebar-1',
    		'before_widget' => '<div>',
    		'after_widget'  => '</div>',
    		'before_title'  => '<h2 class="rounded">',
    		'after_title'   => '</h2>',
    	) );
    add_action( 'widgets_init', 'arphabet_widgets_init' );

    Any suggestions? Many thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Rinku Y


    This should load normally. May be, there are some large images and they are taking time to load. so you see a little difference.

    Thanks for the suggestion, but unfortunately no, there are no images at all in the sidebar. So far it only has a background colour

    does the corresponding sidebar area show under ‘appearance – widgets’ ?
    did you add widgets to that area?

    what files do you have in your theme?

    what plugins are you using?

    • This reply was modified 1 year, 2 months ago by  Michael.

    Yes, Sidebar-1 shows up under widgets, it has a menu widget in it, though I’ve tried other widgets just to see if that helps.

    The plugins I’m using are:
    -Insert Pages
    -Page Builder by SiteOrigin
    -SiteOrigin Widgets Bundle
    -WEN’s Responsive Column Layout Shortcodes
    -What The File
    -WP News and Scrolling Widgets
    although it’s been this way since before I’d even downloaded any plugins.

    I don’t have access to the files just now (hosting login is at work) but the ones I remember are:
    and some templates.

    if you have front-page.php in your theme, this file might be used to show the front page, instead of index.php

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sidebar and main content won’t load at same time (custom theme)’ is closed to new replies.