Reputation: 3019
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
<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
Upvotes: 1
Views: 361
Reputation: 1260
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' ).
Upvotes: 2