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

    will list your pages.

    Thread Starter Lobo

    (@lobo)

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

    Thread Starter 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.

    Thread Starter 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.

    Thread Starter Lobo

    (@lobo)

    any ideas?

    Thread Starter Lobo

    (@lobo)

    any help will be welcome πŸ™

    Thread Starter Lobo

    (@lobo)

    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.

    Thread Starter 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.

    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 (http://www.fitness-academy.com/ which then redirected me to http://www.sfa-news.com/news/), the page links show up.

    Thread Starter 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

    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.

    Thread Starter 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.