Editing a ‘sidebar’ in WordPress

There seems to be a problem with something on my wordpress page as a widget isn’t displaying but I’m not sure how to edit the widget.

The code on homepage.php under Appearance>Editor is

Read More
<section class="row post_content">

  <div class="col-sm-8">

    <?php the_content(); ?>

  </div>

  <?php get_sidebar('sidebar2'); // sidebar 2 ?>

</section> <!-- end article header -->

Where would I find the code for ‘sidebar2’ as at the moment an error message appears on the page where the sidebar should display

Related posts

Leave a Reply

1 comment

  1. As outlined in the Developer handbook for get_sidebar(), your sidebar file should be called sidebar-sidebar2.php. This file will be present in the root directory of your active theme.

    The get_sidebar() hook allows a specific sidebar template file to be used in place of the default sidebar template file. If your file is called sidebar-new.php, you would specify the filename in the hook as get_sidebar( ‘new’ ).