• Resolved dcneuro

    (@dcneuro)


    I recently installed an upgrade, which messed up my headers on my site: https://www.dcneuro.net. (Notice the very top). I have done this initially,however, it was so long ago I forgot which page has the info to omit pages. Any help would be appreciated.

    Thanks,

    Dr. S.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter dcneuro

    (@dcneuro)

    Thanks, that is very helpful.

    I have since learned a bit on this. I have replaced:

    <?php wp_list_pages(‘title_li=’);??>

    with

    <?php wp_list_pages(‘exclude =#,#,#’);??>

    # – page number to be excluded. This no longer shows the pages I wish to be excluded, however, it also no longer shows the pages to be included. Now it simply says “Pages”. This exact script worked fine in the footer.php. How do I write this to include everything else that is not excluded?

    Thanks.

    Your theme’s CSS is hiding the page list because it’s in a nested <ul>. As you’re using the Carrington theme, you might want to look at excluding Pages via the theme’s options.

    Thread Starter dcneuro

    (@dcneuro)

    This had worked in the past, I don’t recall how I exactly configured the script. It recently got screwed up when I installed the updated theme.

    Not sure where I would exclude pages via the “themes options”? Where would those be?

    Sorry – I don’t know Carrington that well but there’s a support forum at https://crowdfavorite.com/forums/ that you might find helpful.

    Thread Starter dcneuro

    (@dcneuro)

    Something is screwy. I looked at that site you referred me in a prior post. My script appears correct. Here is the excerpt from the support page:

    To Exclude Pages from List

    Use the exclude parameter to hide certain Pages from the list to be generated by wp_list_pages.

      <?php wp_list_pages(‘exclude=17,38’ ); ?>

    This appears to only omit pages 17 & 38, while leaving others. This is clearly not what is happening on my site. Rather, it just says “Pages”.

    to get rid of the word ‘pages’ you need to keep the ‘title_li=’ in the ‘wp_list_pages()’:

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

    ps: maybe remove the double ?? as well, as i have done in the above line.

    It’s actually quite logical in the Carrington theme. You’re using something like:

    <ul><li class="pagenav"><?php wp_list_pages('exclude=17,38' ); ?></li></ul>

    In your theme, that is resulting in:

    <ul><li class="pagenav">Pages
    <ul><li class="page_item page-item-538 current_page_item"><a title="Brain Based Neurology" href="https://www.dcneuro.net/vertigo/">Brain Based Neurology</a></li>
    [...]
    </ul></li></ul>

    Carrington’s CSS hides the complete inner list (everything in the second <ul></ul> tag) – leaving only “Pages” showing. The specific CSS is in /css/carrington-text.css:

    #top_navigation ul ul {
    display:none;
    width:auto;
    }
    Thread Starter dcneuro

    (@dcneuro)

    THAT’S IT!!! Voila! Its working again. I just needed to add the “title_li=&” part. Also, I had a second instance of
    ‘ul’, which was creating a bullet. I \knew it was something relatively simple which I was overlooking. I couldn’t figure out how to add that without syntax errors occurring.

    Thanks to all for contributing and helping.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Omiting pages from a header’ is closed to new replies.