WordPress.org

Ready to get started?Download WordPress

Forums

Static Pages on the dynamic menu (35 posts)

  1. Lobo
    Member
    Posted 9 years ago #

    Hi,
    Im trying to create static pages with the same look as WORDPRESS(1.5 wordpress-2005-01-31), my problem is that in the home page I want to have the menu genareted by WordPress and the hard code links to my static pages for that I need to know wich is the PHP line that generate this menu and put this one after my harde code links and apply the same CSS.

    Any help is wellcome
    Lobo

    For the archives.: What I did is go to may home page copy the code to DreamWeaver and remplace the menu already generated by the PHP code (this part with your help).

    This is what I found on this forum but I think is better like this.
    http://wordpress.org/support/10/2523
    http://wordpress.org/support/topic.php?id=11740#post-75288
    http://wordpress.org/support/topic.php?id=2230#post-15324

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    <?php wp_list_pages(); ?>

    will list your pages.

  3. Lobo
    Member
    Posted 9 years ago #

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

  4. Lobo
    Member
    Posted 9 years ago #

    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

  5. Mark (podz)
    Support Maven
    Posted 9 years ago #

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

  6. Lobo
    Member
    Posted 9 years ago #

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

  7. Lobo
    Member
    Posted 9 years ago #

    any ideas?

  8. Lobo
    Member
    Posted 9 years ago #

    any help will be welcome :(

  9. Lobo
    Member
    Posted 9 years ago #

    help please!

  10. Minna
    Member
    Posted 9 years ago #

    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.

  11. Lobo
    Member
    Posted 9 years ago #

    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.

  12. Minna
    Member
    Posted 9 years ago #

    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?

  13. Minna
    Member
    Posted 9 years ago #

    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.

  14. Lobo
    Member
    Posted 9 years ago #

    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

  15. Minna
    Member
    Posted 9 years ago #

    Hey, maybe now I understand the first question :D (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.

  16. Lobo
    Member
    Posted 9 years ago #

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

  17. Lobo
    Member
    Posted 9 years ago #

    nop you are right!

  18. Lobo
    Member
    Posted 9 years ago #

    but the tutorial from Podz is for WP 1.2 and don't work on WP 1.5 :P

  19. Minna
    Member
    Posted 9 years ago #

    I added a link to a forum thread while you were writing those 2 messages. What it says is to have <?php require('./wp-blog-header.php'); ?> on every page where you use WP functions. Be sure to get the path right if you are making the static pages in a different directory/folder from where WP is installed.

  20. Lobo
    Member
    Posted 9 years ago #

    ok is so beatifull we are getting close!!!
    (http://www.sfa-news.com/news/test2.php)

    I can see this links
    Pages
    TEST2

    but all the others are lost what I can do?:
    Archives
    February 2005
    January 2005

    Categories
    Nautilus News (1)
    News (1)
    Uncategorized (1)

  21. Minna
    Member
    Posted 9 years ago #

    Then you naturally have to add the functions to get those too. If you can, you should paste them from the original WP sidebar.php so you get the arguments right but basically the archives are done with <?php wp_get_archives(); ?> and the categories by <?php wp_list_cats(); ?>

  22. Lobo
    Member
    Posted 9 years ago #

    It was working like a charm but when I add the other 2 lines the page seems to be dead

    <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" />
      </div>
      </form>
      <?php wp_list_pages(); ?>
      <?php wp_get_archives(); ?>
      <?php wp_list_cats(); ?>

    </div>

  23. Minna
    Member
    Posted 9 years ago #

    It takes a lot of time to load at least.... I should get going (I'm at work and want to get awayyyyy) but at least I don't see anything wrong with the syntax -- besides, if it worked for the wp_list_pages there's no reason for it to NOT work for the other two. I hope you get it working alright. And if not, someone can help and I'll be at another computer later today :D

  24. Lobo
    Member
    Posted 9 years ago #

    Ok thank you for your help :) you save me, I cant see this 2 tags on the sidebar.php of the versionWP 1.5 but I will bother someone else hehehehe
    you are great.!!!

  25. Lobo
    Member
    Posted 9 years ago #

    anyone can give a hand on this? and all this people too :)

    http://www.google.com/search?hl=en&lr=&q=static+pages+site%3Awordpress.org

    I hope we can see a tutorial for version 1.5 soon Thank you on advance

  26. Minna
    Member
    Posted 9 years ago #

    Well, I don't see any reason for external static page tutorial for 1.5 because one of its big features is the ability to make "static" pages, or pages outside of the blog chronology (or how was it put so grandly in the admin section).
    Anyway, you're still having problems? The two functions causing grief?

  27. Lobo
    Member
    Posted 9 years ago #

    I have WordPress 1.5 “Strayhorn� right now but can you tell me how to make the satic webpages ? there is any tutorials for this version and I would love to know all the new features is sad that we can see that on the home page of the project :(.

    Thank you Minna for your help. (Ecuador?)

  28. Michael Adams (mdawaffe)
    Member
    Posted 9 years ago #

  29. Minna
    Member
    Posted 9 years ago #

    I'm sure you can whip up home-made static pages on 1.5. I just don't know how, off the top of my head, but I can try and if someone does know this, they can help. If there are tutorials or tips, you'll probably find them at Codex.

    There's a short change log for 1.5 at the Codex and it pretty much covers the basic changes :D You can venture around Codex to find out more about them (themes, making your own theme, pages). For me the new WP pages are working fine. I just upgraded yesterday (loving it!) and I'm changing all my home-made static pages to the new ones. It's so easy to manage them through the WP admin section so I couldn't be bothered to make extra pages. It's also much easier to get them conform to the rest of the site because they are part of the site. What if you (or someone) change the structure of the site? All the outside static pages have to be changed too. And you have to *remember* to change them :) (oh... I could go on and on about that remembering part)

    At the moment I haven't figured out how one could use the WP functions on own pages, because there doesn't seem to be anything to get them in use (like the comforting require clause at the beginning of the old index page). But as I said, I'd have to look into that.

    What you mean by Ecuador? That I'm from there? Nah, snowy Finland.

  30. Lobo
    Member
    Posted 9 years ago #

    I’m blind? (Maybe) but I can't find anything about static WebPages on WP 1.5 and I don't have a clue how to create them with WP.
    http://codex.wordpress.org/index.php?title=Special:Search&redirs=0&searchx=1&search=Static&limit=500&offset=0
    http://codex.wordpress.org/Pages

    -----
    [quote] how one could use the WP functions on own pages, because there doesn't seem to be anything to get them in use[/quote]

    Please let me know if you find how to do it :)

    -----
    Ecuador: My sister have a friend that have your name (Minna) she comes from Ecuador but her parents are from Korea now she is a doctor and now lives on NY-USA and I thought it was you :)=

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.