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.

    Lobo

    (@lobo)

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

    Lobo

    (@lobo)

    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
    http://138.190.141.56/news/test2.php

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

    Lobo

    (@lobo)

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

    Lobo

    (@lobo)

    any ideas?

    Lobo

    (@lobo)

    any help will be welcome 🙁

    Lobo

    (@lobo)

    help please!

    Minna

    (@minna)

    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.

    Lobo

    (@lobo)

    Thank you Minna for stop here 🙂 Im breathing now!
    Can you just take alook to the source and toldme if Im blind too 🙂
    http://138.190.141.56/news/test2.txt Thank you on advance.

    Minna

    (@minna)

    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?

    Minna

    (@minna)

    By the way, when I went to the page in the source (http://www.fitness-academy.com/ which then redirected me to http://www.sfa-news.com/news/), the page links show up.

    Lobo

    (@lobo)

    oky
    I put all the code here: http://138.190.141.56/news/test2.txt

    <div id="sidebar">
    <ul>

    <li>
    <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" />
    </div>
    </form> </li>

    <?php wp_list_pages(); ?>
    </div>

    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(); ?>
    http://138.190.141.56/news/index.php

    Minna

    (@minna)

    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.

    Lobo

    (@lobo)

    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.