1

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?

1
  • Do you have any menus in "Appearances->Menus" that has Archives and Meta? Commented Jan 26, 2017 at 0:04

2 Answers 2

1

The 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().

1

Updated for 2020,

Goto Appearance ---> Customize ---> Widget (Note: If there is no APPEARANCE OPTION click on DESIGN and CUSTOMIZE)

enter image description here

Next Click on ADD WIDGETS. Notice that side navigation is present.

enter image description here

After clicking on ADD WIDGET, scroll down the list to NAVIGATION MENU and select it.

enter image description here

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.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.