Support » Fixing WordPress » Static Pages on the dynamic menu

Viewing 15 replies - 1 through 15 (of 34 total)
  • <?php wp_list_pages(); ?>

    will list your pages.

    Thank you PODZ I will try it right now 🙂 but tell me is this is the best approach to achieve this.

    I remplace what is inside <div id=”sidebar”> </div> with <?php wp_list_pages(); ?> and now I cant see the bottom of the page and there is no Menu anymore.

    take a look

    the call wp_list_pages goes inside the sidebar, it does not replace it.

    Ok let me see if I undertand this line <?php wp_list_pages(); ?> will generate the menu (links to all the News?) Im lost.

    any ideas?

    any help will be welcome 🙁

    help please!

    Calm down, relax, take a few deep breaths 🙂

    There must be something wrong with the syntax on your sidebar because it’s cut (it’s difficult to tell what’s wrong looking at the generated html). Is there a php tag missing? A missing semicolon? What do you have after <div id="sidebar">? Remember to put backticks around the code here so it’ll show up.
    The php snippet <?php wp_list_pages(); ?> really is as easy as it looks, and it works.

    By the way, if it’s not clear (I just read your initial question more carefully), wp_list_pages function lists the pages you have created on WP… If you need to link to non-WP static pages, you can make a link category and put those links in there.

    Thank you Minna for stop here 🙂 Im breathing now!
    Can you just take alook to the source and toldme if Im blind too 🙂 Thank you on advance.

    How can the function show in the source code? Can you paste a bit of your sidebar.php (or whatever its name is) template around where the wp_list_pages is?

    By the way, when I went to the page in the source ( which then redirected me to, the page links show up.

    I put all the code here:

    <div id="sidebar">

    <form method="get" id="searchform" action="/news/index.php">
    <div><input type="text" value="" name="s" id="s" />
    <input type="submit" id="searchsubmit" name="Submit" value="Search" />
    </form> </li>

    <?php wp_list_pages(); ?>

    What I did was, I go to index.php on my bowser, and I copy the source code and after I search for the div that cotaine my menu and I remplaced by <?php wp_list_pages(); ?>

    Hey, maybe now I understand the first question 😀 (I blame it on now being a Friday). You are trying to get a separate page from WP and use WP functions on it? And your test page just happens to look like a blog page? If that’s the case, you need something at the beginning of the document, an include statement to get the WP functions. There’s been talk about it here. Ah, see Podz’s tutorial for example. Or am I still understanding it all wrong?

    And here is a forum thread on *maybe* the same issue.

    ok I test it on IE/firefox and I cant’t see the links and the bottom of the page is not rendered 😛

Viewing 15 replies - 1 through 15 (of 34 total)
  • The topic ‘Static Pages on the dynamic menu’ is closed to new replies.