Support » Fixing WordPress » Problem Adding Child Items to a Menu w/ PHP

  • Hi,

    I am in a position where I need to modify a site that I did not build, and the person that built it cannot be contacted. Here is the site.

    Basically, I need create sub-menu items of a button in the navigation that currently does not have any. The problem is that the person the created the website opted not to use the built-in menu creation and coded everything with PHP. I don’t understand PHP enough to figure out what is keeping the child items from displaying underneath this button upon hovering over it.

    This is the code in “navigation.php” that relates to the button in question:

    <li class="toplinkli"><a href="<?php echo get_permalink(20); ?>" class="toplink" style="border: 0"> Contact </a> <?php $childpages = get_pages("child_of=15"); if ($childpages) { ?> <ul> <?php wp_list_pages('title_li=&sort_column=menu_order&child_of=20&depth=2'); ?> </ul> <?php } ?> </li> </ul>

    I assume that I need to somehow modify that “if” statement, but after reading tons of documentation, I am at a complete loss. Does anyone have any advice for me?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter cma2032

    (@cma2032)

    Does anybody know?

    Which button are you talking about? I see dropdowns in several menu items.

    Thread Starter cma2032

    (@cma2032)

    Sorry, I should have been more clear.

    I need to add a dropdown to “Contact.” I can’t figure out what is different between the buttons with dropdowns and the buttons without, with respect to the PHP.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem Adding Child Items to a Menu w/ PHP’ is closed to new replies.