• Maybe somebody can confirm that these are WP 2.7 issues and/or help with resolving it.

    I have a local installation of WP 2.7 with default theme (Kubrick).
    Plugins installed: All In One SEO, Google XML Sitemap and My Page Order
    10 Pages.
    Settings Reading is to show the welcome page as default.

    a) Pages Widget Not Working

    Under Appearance Widgets I cannot add the Pages widget to the sidebar.
    It does not have an Add link. Only the grey box.

    Note: there is only 1 sidebar with one Text Widget in. Both the sidebar and that text widget display correctly on the site.

    b) wp_page_menu customization

    In customizing the theme slightly, I wanted to add a menu bar, so I added the new wp_page_menu code. The result works. As there are 10 pages, the menu is too long, so I wish to exclude a few of those 10 pages. I have not found documentation on how to do it and placing an exclude=1& in the code doesn’t work.

    Maybe it should? Maybe it shouldn’t? Maybe it should be requested for the future?

    I should note that I did use a plugin “My Page Order” to re-arrange the page order visually.

    c) wp_list_pages doesn’t exclude pages

    I fell back on wp_list_pages, using the code from the codex. The default shows fine in the site. When I use exclude in it, all 10 pages are still listed on the menu? Doesn’t matter if I try a 0 or 1 or 2, or 1,2 …

    I appreciate any insight on these topics raised and possible confirmation that the pages widget is currently broken as well some bugs with the page exclusion.

Viewing 14 replies - 1 through 14 (of 14 total)
  • a. Deactivate ALL plugins and see if that resolves.
    b. The template tag, wp_page_menu(), does not provide exclude ability.
    c. Using the WordPress Default Theme with the following code in the sidebar.php I am not seeing the exclude problem you mention.
    <?php wp_list_pages('exclude=2&title_li=<h2>Pages</h2>' ); ?>

    Thread Starter icerabbit

    (@icerabbit)

    Thanks for the quick reply, Michael.

    a) All plugins deactivated.

    Pages is listed as an available widget, but I cannot add it. There is no add link in the pages widget to click on.

    All other widgets below it do have the add link and behave properly.

    b) thanks for that confirmation.

    Hopefully functionality will be expanded in the future.

    c) The wp_list_pages in the sidebar it works properly, when added there.

    In the menu header it does not.

    Using the simplest code in the menu:
    <?php wp_list_pages(‘exclude=2’ ); ?>
    I can hide page 2, but, only page 2 … any other single number does not hide?

    Ditto for code like:

    <?php wp_list_pages(‘exclude=0,1&sort_column=menu_order&title_li=’); ?>

    Which should omit the pages section on top and leave out #0 and #1.

    I’m more than puzzled by the last issue.

    This is the fashion by which it is presented in the header.php; which I think should be fine, and not cause any problems as to showing how many of the 10 pages specifically.

    <div id="menubar">
     <div id="menu">
       <ul>
          <?php wp_list_pages('exclude=1&title_li='); ?>
       </ul>
     </div>
    </div>

    You are using the WordPress Default Theme?

    Please paste your revised ‘header.php’ in a pastebin and report the link back here–maybe someone can spot the problem.

    Thread Starter icerabbit

    (@icerabbit)

    Again, thanks Michael.

    It is/was the default theme that came with 2.7, yes, until I started to modify some little things to mold it towards an existing design. The minor edits, which I verified after each step, mainly involve gathering related CSS sections together, changing some CSS code … And everything seems to function and display fine.

    The code inside my header.php can now be found at:

    pastebin

    Without your css and just adding

    <div id="menubar">
    	 <div id="menu">
    		<ul>
                <?php wp_list_pages('exclude=2,109,93&title_li='); ?>
    
             </ul>
    	  </div>
    </div>

    before the hr and it shows the pages without the 2,109,93 id pages.

    Please make sure you are using the correct page IDs.

    Thread Starter icerabbit

    (@icerabbit)

    Thanks for that confirmation, Michael,

    I thought the code was clean and I probably have something confused then.

    I assumed the page ID # to be the same as the Order #, in Attributes, in the lower right hand side of the Edit Page window.

    As such I have:
    Welcome = 0
    Permalink: http://localhost:8888/wordpress/home/

    About = 2
    Permalink: http://localhost:8888/wordpress/about/

    FAQ = 3

    Etc.

    And with that # I have been trying to exclude pages; which doesn’t seem to work right in my case.

    If there is another number for these pages I need to use, how could I verify it?

    My permalink choice right now is: http://localhost:8888/wordpress/2009/01/sample-post/

    Nope order is a different animal. Hover your mouse over the Page Title in Pages -> Edit to see the ID in the URL displayed in the browser status bar.

    Thread Starter icerabbit

    (@icerabbit)

    Thanks a ton, Michael, for your prompt assistance!

    You solved the mystery regarding my page id exclude not working. Something so simple, so hidden. I guess my thinking was too logic. Anyway, at least I don’t have to worry about that one any more and can finally get back to theme-ing with a shorter menu bar 🙂

    I will leave the non-functioning page widget for what it is, since the hard coded one works.

    Again, many thanks!

    You are welcome.

    I’ll mark this resolved.

    Pages is listed as an available widget, but I cannot add it. There is no add link in the pages widget to click on.

    Were you able to solve the problem of the “add” link not appearing on the Pages widget? I’m having the same issue and I can’t for the life of me figure out what is going on. Every other widget is working fine.

    Unresolving this:

    @3zero3 – If you change to the WordPress Default theme do you have the problem?

    icerabbit said

    a) Pages Widget Not Working

    Under Appearance Widgets I cannot add the Pages widget to the sidebar.
    It does not have an Add link. Only the grey box.

    3zero3 said

    Pages is listed as an available widget, but I cannot add it. There is no add link in the pages widget to click on.

    I wonder if this is activating a theme that had two sidebars, adding the Page Widget to what would be the 2nd sidebar, then changing to a theme with just one sidebar?

    If so, try changing back to a two sidebar theme, removing the Pages widget, then back to the single sidebar theme.

    Also guess you could delete the ‘widget_xxxxx’ option names in wp_options or set their values to a:0:{}

    If that is the issue, please report back here. Thanks.

    going to give that a try…

    Well I have tried everything I can think of…
    Guess I am going to have to redo the whole thing…

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘WP 2.7 Pages Widget and wp_list_pages wp_page_menu issues’ is closed to new replies.