• footprints.music

    (@footprintsmusic-1)


    I have a theme I am modifying. I want to have some pages (about 5 or 6) that will show up when someone clicks on a link on one of my pages. I don’t want these pages to be a part of my Navigation menu. I downloaded a plugin called “Exclude Pages from Navigation” and installed it but the pages I create still show up in the navigation but just below the page it’s “linked” to. Is there a way to not have it at all?

    Also, if someone could tell me how to use my existing theme’s sidebar and new widgets that would be great. the widgets erase the sidebar items. Can it be done?!

    Thank you!

    Alex

Viewing 2 replies - 1 through 2 (of 2 total)
  • richarduk

    (@richarduk)

    I’m guessing that you mean Pages, not posts, and that you’re talking about links to Pages in the sidebar?

    In which case, exclude_tree <?php wp_list_pages('exclude_tree=7');?> would exclude all the child Pages of a parent Page with an ID of 7 – that’s the way I’d do it.

    https://codex.www.ads-software.com/Template_Tags/wp_list_pages#Exclude_Pages_from_List

    If you want new widgets in a sidebar create two containers something like this:

    <div class="box" id="box6">
    <ul class="widgets1">
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(1) ) : ?>
    </ul>
    </div><!--Close box6-->
    <div class="box" id="box7">
    <ul class="widgets2">
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(2) ) : ?>
    </ul>
    </div><!--Close box7-->

    Now in your functions.php add this:

    if ( function_exists('register_sidebars') )
    	register_sidebars(2);

    Most widgets churn out surrounding list elements, so once you’ve installed your widgets check View Source to see what they’ve done and amend the html above as necessary.

    Thread Starter footprints.music

    (@footprintsmusic-1)

    You rock Thanks! I’ll try that

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘“Hiding” Pages and sidebar widgets’ is closed to new replies.