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
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' ).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.