WordPress.org

Ready to get started?Download WordPress

Forums

Is there a way to hide certain "pages" from being in the list of pages (15 posts)

  1. JohnnyGulag
    Member
    Posted 9 years ago #

    Hello

    I was curious if there is a way after I create a new page, to hide certain pages from being in the generated list of pages that appears in my sidebar?

    Also, while I am here I have another question. The list of links that I create in my control panel also generates a list in the sidebar with a <h2> heading I want to change it to an <h3> but am unsure how to do it. All the other generated lists in the sidebar have visible <h2> tags to change but the links list does not.

    Here is the code in question: (i think)
    <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    <?php get_links_list('id'); ?>

    Thanks to anyone whom can solve my issues :)

  2. oriecat
    Member
    Posted 9 years ago #

    See here for where the h2 is coming from. Most people have wanted it gone, since it was added anew in 1.5, but you could just change it to h3 instead of deleting it.

    http://wordpress.org/support/topic.php?id=24245

  3. oriecat
    Member
    Posted 9 years ago #

    to exclude pages:
    <?php wp_list_pages('title_li=my pages&exclude=##'); ?>

    where ## is the ID of the page you don't want shown in the list

    and my pages would be whatever you want the heading to be

  4. JohnnyGulag
    Member
    Posted 9 years ago #

    Man I really appreciate that, especially so fast I looked and looked for those tags but did not find them til now.

    Thanks again

    PS
    Anyone else know if it is possible to hide certain pages from being in the pages list?

  5. JohnnyGulag
    Member
    Posted 9 years ago #

    Wow

    This forum is a happening place.

    to exclude pages:
    <?php wp_list_pages('title_li=my pages&exclude=##'); ?>

    where ## is the ID of the page you don't want shown in the list

    and my pages would be whatever you want the heading to be

    Thanks you have solved my issuse I believe, though it may take a bit more looking at than my other issue.

    Thanks to you both for the assistance :)

    Later
    Ben aka Johnny

  6. Kafkaesqui

    Posted 9 years ago #


  7. JohnnyGulag
    Member
    Posted 9 years ago #

    Hello

    I do have one more questtion about this code:

    <?php wp_list_pages('title_li=my pages&exclude=##'); ?>

    Where the ## is am I placiing the page numbers inside the #6# ornext to the #6 or in place of the # (ie: just a 6) and how do I seperate more than 1 page?

    Thanks Again

  8. oriecat
    Member
    Posted 9 years ago #

    Just put the 6 and use a comma between multiples, so like

    <?php wp_list_pages('title_li=my pages&exclude=6,12'); ?>

  9. JohnnyGulag
    Member
    Posted 9 years ago #

    Hello

    Thanks you are awesome !!!!

  10. JohnnyGulag
    Member
    Posted 9 years ago #

    Hello

    Ok I have another question,(maybe a dumb one) what is the page ID?

    <?php wp_list_pages('title_li=my pages&exclude=what am I'); ?>

    I was thinking of the page order number you assign as you create a page, but apparantly that is not it.

  11. JohnnyGulag
    Member
    Posted 9 years ago #

    Duh, I just found it.

    Thanks anyway :)

  12. Torvon
    Member
    Posted 8 years ago #

    The script works, but messes around with my design, for no obvious reason.

    Normal code works fine:
    <?php wp_list_pages('sort_column=menu_order&title_li=<h4>
    ' . __('pages') . '</h4>' ); ?>

    If I put this in, the graphics of my submenues get screwed. Does anyone have a clue, why?
    <?php wp_list_pages('sort_column=menu_order&title_li=<h4>
    ' . __('pages&exclude=37') . '</h4>' ); ?>

  13. Torvon
    Member
    Posted 8 years ago #

    Anybody an idea?
    If I use this code, my submenues "grow" some px ..

  14. wubbonius
    Member
    Posted 7 years ago #

    hi - just to add to the discussion:

    my solution for hiding pages if you want to have them temporarily of, is to make a page called 'hidden' and put it in the exclude list. Than if I want a page to be off for some reason, I just make it a subpage of the 'hidden' page...

    Just make sure you have it excluded in all your listings ;-)

    Cheers,

    Wubbonius

  15. JibHunt
    Member
    Posted 7 years ago #

    Hello.

    I understand the code that needs to be used to hide pages....but where do you put the Code?

    Within which file?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.