treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Content showing in sidebar and not "main content area"

  • Hello.

    I'm making a (more or less static) website in Wordpress, where I have a horizontal menu showing all the parent pages. I have a few subpages connected as children to one of the parent pages. The links to the subpages are showing in the sidebar.php using the following code:

    <?php
    $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
    if ($children) { ?>
    <ul class="submenu">
    <?php echo $children; ?>
    </ul>
    <?php } ?>

    But when I click on one of those links, the design is a mess. The content shows up in the sidebar. So here is my question: Can I make the content of the links in the sidebar show up in the "main content area" - if so, how?

    And one more question: When I add a page as a child to a parent page, it's showing in the main horizontal menu, messing up the design - is it possible to exclude the title of this child page in the main menu, but still keep the listing in the sidebar (when the parent page with children is selected?

    I really hope I can get some answers.

    Thanks in advance,
    Kralle
  • I would just start by running your code through the validator, it will help you pick up on anything that isn't closed, like a div for example.

    Then I would have a run through some tutorials - your questions are pretty huge and have many answers/outcomes because there are many things that can be causing the problems :)

    It might just be easier if you are able to familiarise yourself with WP again :D
  • I know it's a huge question, but you're right. I should get to know Wordpress a little better before I jump into something this "big". It's too much for a guy at my level. I think I'll start by making a few custom templates and link to the instead of making it all "automatic".

    Thanks for your suggestion, sir. :-)

    EDIT: I added [SOLVED] to the title, so people won't come with suggestions I'm not ready for yet.
  • No probs - there are some excellent tutorials around on CSS Tricks and Chris' other site http://digwp.com/ - also there are plenty on the http://net.tutsplus.com/ site :)