Forums

Adding Pages Under "Parent" - How? (31 posts)

  1. dougf4
    Member
    Posted 2 years ago #

    Here is what I am trying to accomplish.

    My Theme does not have "drop down" menus, nor have I been able to get any plug-in to work to give me this support. So what I want is the next best thing since I can't have that.

    I have added hyperlinks at the top of one of my "Pages" to take the viewer to other articles. These "articles" are "Pages."

    The "Parent" page is "Gardening" and the "Sub Pages" are various gardening topics.

    If I "publish" what I want to be "Sub Pages" to the "Parent" page, rather than going into a "drop down, they appear as "buttons" alongside the "Parent" page. I see no functionality to this feature at all.

    I thought I had the work around, but of course not! I saved the "Sub Pages" as Private and it worked....that is until I discovered that the only reason it worked was because I was logged in as Administrator, as soon as I log out, all the links default to the .index page.

    This is probably real confusing, so here is the url to the page I am working with on so you can see what I am attempting:

    http://www.theruralindependent.com/gardening-supplies-information

    Thank you in advance for any help offered.

    (I really probably ought to switch to a Theme that will give me drop down support, so if anyone after seeing my page and how packed with content (4 columns) it is has any suggestions please let me know.)

  2. frosken
    Member
    Posted 2 years ago #

    Do you want all pages to be listed as a dropdown? Where Subpages are included in a dropdown? Or do you just want the subpages in a dropdown when your in a spesific page?

  3. dougf4
    Member
    Posted 2 years ago #

    I'm not 100% sure of your quesiton - sorry for my ignorance.

    But I would think that whatever is closest to the traditional "drop down" Hierarchy.

    I'd like the visitor to see the drop down choices from the main page and then also from the "main page" for the topic.

    If the second option is all that I can get, then that will surely be better than nothing at this stage.

    If all I can get is some sort of hyperlink from the parent page to the sub-page like I am attempting, I can live with that for now.

    Thanks for your help on this!

    Doug

  4. frosken
    Member
    Posted 2 years ago #

    Hello,

    Have you tried the categories widget and set it to dropdown in their setting?

  5. dougf4
    Member
    Posted 2 years ago #

    No, is that the name of it, or is there one particular one you might recommend?

    Also, on my Theme, my categories appear in the main part of the page and "posts" nest underneath of them.

    Pages are what appear in the nav bar up top and then open as new pages.

    http://www.theruralindependent.com

  6. frosken
    Member
    Posted 2 years ago #

    I assume your theme is using / supporting widgets? If you go to your "Appearance" tab and click "Widgets" then you will be able to drag a widget named "Categories" to the sidebar on the right of the screen, from there you can tick a box to show the categories as "Dropdown"

  7. dougf4
    Member
    Posted 2 years ago #

    OK, I've added the Widget and ticked the show categories.

    I then published a "page" called "Deer Proofing" listing "Gardening" as it's "Parent."

    "Deer Proofing" still shows up as a "Parent" in the menu bar alongside of "Gardening." There is no drop down listed under Gardening either.

    Am I doing things as I should?

  8. frosken
    Member
    Posted 2 years ago #

    I am still a bit confused where you are trying to locate this dropdown, but currently your dropdown is appeared on the sidebar next to the "Categories" list.

  9. dougf4
    Member
    Posted 2 years ago #

    Well, duh on me for not knowing the lingo I guess.

    What I want is in the top bar, I believe it is the "nav" bar is to have the sub pages drop down from the labeled button. In my example, you would hover over "Gardening" and the sub pages will appear below in a list. This is the traditional thing you see all the time on the web.

    Sorry for the confusion. I definitely do not want the category drop box. I do see it now and I also see how placing it in the right sidebar has moused up my whole page, although I do kind of like the wide, xtra columns in the top half. The bottom half pretty much bites tho!

  10. frosken
    Member
    Posted 2 years ago #

    I am sorry, can you take a screenshow of your page, and mark where you want the dropdown to appear in paint etc?

    I am still very confused on where you want the dropdown located.

  11. dougf4
    Member
    Posted 2 years ago #

    Sure, but it will be awhile before I can get to it.

    If you just go to the top of this page and hover your mouse over the "Blog" button, you'll see it turn white.

    When I do this on my site, I want the "sub-pages" to appear below the button being hovered over.

    Thanks for all your help frosken!

  12. frosken
    Member
    Posted 2 years ago #

    Hello,

    You need to replace the navigation code in your header file with the following to accomplish what your trying.

    <ul>
    <?php wp_list_pages("depth=3&title_li="); ?>
    </ul>

    Then you need to put the appropriate styling on the dropdown menus! Please enter that code replacing your old navigation, and i will see if i can put some styling on your sub navigation :)

    Sorry for the confusion, suddenly it came clear to me what you wanted wafter your last explenation.

  13. dougf4
    Member
    Posted 2 years ago #

    Cool - it seems that I should wait for that second code before proceeding and killing my present nav.

    ThanX!

    Doug

  14. frosken
    Member
    Posted 2 years ago #

    Your present nav wont be killed, it will be working like your current nav is doing! Only difference is that your new navigation will also list the subpage below the approiate main menus.

  15. dougf4
    Member
    Posted 2 years ago #

    When I tried it, things got all janked up.

    Here is the navigation code. Can you please help me with what to remove and replace? I obviously did something wrong.

    <!-- begin navigation -->

    • ">Home
    • <?php dp_list_pages(); ?>

    <!-- end navigation -->

  16. frosken
    Member
    Posted 2 years ago #

    You need to remove everything and including <ul> menu </ul>..

    What you did was to put the new code inside an existing <li> </li>

  17. dougf4
    Member
    Posted 2 years ago #

    Didn't like that much better!

    Here is the code as placed:

    <!-- begin navigation -->

      <?php wp_list_pages("depth=3&title_li="); ?>

    <!-- end navigation -->

    Here is the result:

  18. frosken
    Member
    Posted 2 years ago #

    If this is in your header.php file, then please upload the entire content of it to something like http://pastebin.com and send me the link, i will sort out the code for you.

  19. dougf4
    Member
    Posted 2 years ago #

    It is in pastebin under "dougf"

    Thanks so much!

  20. frosken
    Member
    Posted 2 years ago #

    HELLo,

    Please replace your current header.php with this header.php, it should do the trick for you :)

    http://pastebin.com/m5295edc6

  21. frosken
    Member
    Posted 2 years ago #

    HELLo,

    Sorry, i did a small mistake! In your code where you have this

    <ul class="nav">
    <?php wp_list_pages("depth=3&title_li="); ?>
    </ul>

    Replace it with

    <ul id="nav">
    <?php wp_list_pages("depth=3&title_li="); ?>
    </ul>

    And you should be all set ;)

  22. dougf4
    Member
    Posted 2 years ago #

    Holy Crap - it works!!! You are awesome.

    This was driving me so nuts because I migrated to this theme and lost this type of menu structure, but the search engines are holding all the url's of the pages that are no longer displayed so I am having a lot of people and crawlers getting 404 errors as I am on a blitz campaign to attract visitors. This will help immensely.

    Thank you so much my friend!

    Doug

  23. frosken
    Member
    Posted 2 years ago #

    HELLo,

    Anytime ;)

  24. dougf4
    Member
    Posted 2 years ago #

    ruh - rho...

    The second sub-page is not placed under the first, but to the right of it, in-line with it.

  25. frosken
    Member
    Posted 2 years ago #

    HELLo,

    Inside your header file i added something named <style> css code </style>

    At the bottom of this, right before the </style> add the following code

    #nav li ul li {
            float: none;
            background-color:#7EA700;
    }

    That should do the trick ;)

  26. dougf4
    Member
    Posted 2 years ago #

    Voila! Another save, and another huge thank you!

  27. deanswa
    Member
    Posted 2 years ago #

    Hi,

    Almost same issue. I can create a subpage but it wont show up if i hover over the parent page w/c is a navigation bar. need help

  28. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    What have you done so far? Have you worked through the suggestions here? You probably need to increase the depth in your theme as suggested by @frosken in about post#12 here.....

  29. deanswa
    Member
    Posted 2 years ago #

    Hi,

    Tried #12 but it simply duplicates the nav bars(pages) of the top portion of the header w/ the bottom ones. this is the code in my header file:

    <div id="pages">

      <?php wp_list_pages("sort_order=$artsee_order_page&depth=1&exclude=$artsee_exclude_page&title_li="); ?>

    With this all pages in the dashboard will show up as nav bar (top to bottom of the header) but not the subpages. Increasing the depth will make the subpage a "permanent" nav bar. dont want that. I just want the subpage to be seen if i hover on the parent page.

  30. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    right, so you are halfway there.....you do need to increase the depth....however you need to apply styling in your css to get the child pages to behave the way you want...

    unfortunately, dropdown menu's aren't my strength..yet (I've never needed to use them on my theme)

    look for some tutorials online maybe:
    http://ago.tanfa.co.uk/css/examples/menu/tutorial-h.html#menref
    http://www.coalmarch.com/coalmarch-blog/20080701180/super-easy-5-minute-pure-css-drop-down-menu-tutorial.php

    Maybe one of them can help you.....

Topic Closed

This topic has been closed to new replies.

About this Topic