This should be easy right? Removing Archives and Meta from the sidebars of two of my main WP pages. I can't seem to! I've looked in Appearance > Widgets and made sure Archives and Meta was not appearing in any fields. I have checked my Theme's (Fruitful) options in Customizer--playing with the width layout, and I have tried diddle dallying with some of the PHP files and CSS to see if I could remove by deleting some things. Deleting is the most I can do. Since I am no means a code writer.
Any ideas?
This should be easy right? Removing Archives and Meta from the sidebars of two of my main WP pages. I can't seem to! I've looked in Appearance > Widgets and made sure Archives and Meta was not appearing in any fields. I have checked my Theme's (Fruitful) options in Customizer--playing with the width layout, and I have tried diddle dallying with some of the PHP files and CSS to see if I could remove by deleting some things. Deleting is the most I can do. Since I am no means a code writer.
Any ideas?
Share Improve this question edited Jan 26, 2017 at 0:41 Dave Romsey 17.9k11 gold badges56 silver badges70 bronze badges asked Jan 25, 2017 at 23:46 JessicaJessica 111 silver badge3 bronze badges 1- Do you have any menus in "Appearances->Menus" that has Archives and Meta? – czerspalace Commented Jan 26, 2017 at 0:04
2 Answers
Reset to default 1The theme is set up so that if a sidebar is inactive, default content will be shown (search form, monthly archives, and meta).
For example, the sidebar.php
file:
<?php
/**
* The Sidebar containing the main widget areas.
*
* @package WordPress
* @subpackage Fruitful theme
* @since Fruitful theme 1.0
*/
?>
<div id="secondary" class="widget-area" role="complementary">
<?php do_action( 'before_sidebar' ); ?>
<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
<aside id="search" class="widget widget_search">
<?php get_search_form(); ?>
</aside>
<aside id="archives" class="widget">
<h1 class="widget-title"><?php _e( 'Archives', 'fruitful' ); ?></h1>
<ul>
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
</ul>
</aside>
<aside id="meta" class="widget">
<h1 class="widget-title"><?php _e( 'Meta', 'fruitful' ); ?></h1>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</aside>
<?php endif; // end sidebar widget area ?>
</div><!-- #secondary .widget-area -->
You can override the theme's sidebar.php
file by creating a child theme and adding your own customized sidebar.php
file to it. E.g.:
<?php
/**
* The Sidebar containing the main widget areas.
*
* @package WordPress
* @subpackage Fruitful child theme
* @since Fruitful child theme 1.0
*/
?>
<div id="secondary" class="widget-area" role="complementary">
<?php do_action( 'before_sidebar' ); ?>
<?php dynamic_sidebar( 'sidebar-1' ); ?>
</div><!-- #secondary .widget-area -->
The theme uses several sidebars (sidebar.php
, sidebar-blogright.php
, sidebar-homepage.php
, sidebar-page.php
, sidebar-single-post.php
plus the store related sidebars, which are set up differently) so follow this procedure for each sidebar that you would like to modify using the appropriate sidebar name when calling dynamic_sidebar()
.
Updated for 2020,
Goto Appearance ---> Customize ---> Widget (Note: If there is no APPEARANCE OPTION click on DESIGN and CUSTOMIZE)
Next Click on ADD WIDGETS. Notice that side navigation is present.
After clicking on ADD WIDGET, scroll down the list to NAVIGATION MENU and select it.
Notice that side pane navigation is gone. You don't have to add nothing to NAVIGATION MENU. LEAVE IT BLANK. CLICK SAVE CHANGES.
I handle my navigation by text hyperlinks within the body of my page by highlighting text content. Gives cleaner appearance in my opinion.