Can someone check this php syntax? Please?

Discussion in 'WordPress' started by newman32, Apr 24, 2008.

  1. #1
    Similar to another post about hiding wordpress pages, I know but a little different.

    I'm trying to create two pages to link from the blogroll, but not be listed in the top nav bar. One is a privacy policy page, the other is a terms of use page.

    I put this code into header.php, which is supposed to exclude page 1001 from the navigation bar up on top.

    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li=&exclude=1001'); ?>


    When I am logged in as a user, it works like a charm if the page is unpublished. When I am logged out and click on the blogroll link, I get a 404 error.

    If I publish the page, it shows up in the top navigation, which is not good!

    So, can someone look at the above code and let me know if I have it goofed up somewhere? I've looked, and it seems to be correct, but it does not work! That page keeps showing up in the nav bar as soon as I publish!

    Thanks!!!
     
    newman32, Apr 24, 2008 IP
  2. mizaks

    mizaks Well-Known Member

    Messages:
    2,066
    Likes Received:
    126
    Best Answers:
    0
    Trophy Points:
    135
    #2
    Try:

    <?php wp_list_pages('exclude=1001'); ?>
    Code (markup):
    and see what happens. If it works then you know your syntax is wrong.
     
    mizaks, Apr 24, 2008 IP
  3. newman32

    newman32 Peon

    Messages:
    42
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hey, thanks. What I ended up using was the "Page Link Manager" which seemed to to the trick. I don't know how it did it, my old code is still there, but that plugin fixed it and it is exactly what I want now. Thanks for the assist! :)
     
    newman32, Apr 25, 2008 IP