• Hi everyone!

    I’m making this website for a friend of mine. And.. He wanted a menu-structure I really can’t make. I’ve tried with some regular expressions (preg_replace), but it wont work..

    The structure I want is:

    Parent page 1
    – Parent page 1
    – child page 1
    – child page 2
    – child page 3
    Parent page 2
    – Parent page 2
    – child page 1
    – child page 2

    And I’m using the wp_page_menu() function to output the menu.

    How to do this? I’ve tried changing the output with preg_replace, but maybe I’m just too stupid..

Viewing 8 replies - 1 through 8 (of 8 total)
  • Can you describe, in human terms what you’re trying to accomplish?

    I can’t tell from your structure what you’re actually trying to do. Are you trying to make a page a child of itself? Or are you merely trying to modify the page list output/display?

    Thread Starter Valdemar

    (@kebablover)

    I’m sorry I couldn’t describe it better. I would like to make a page a child of itself.

    I don’t know if there’s any easy way to do it, or if I have to use preg_replace() or whatever.

    I’ve searched a bit on google, but without luck. And I’ve tried using the php function preg_replace(), but my regular expression did not work well.

    I would like to make a page a child of itself.

    There is no way for a page to define its own ID as post_parent. The sky would probably fall on your head if you tried. ??

    Another question: why do you need/want to make a page a child of itself? What, ultimately, are you trying to accomplish?

    Thread Starter Valdemar

    (@kebablover)

    Haha ?? Well.. Then I at least want to make it look like it’s a child of itself.

    And why I want it so? Well.. The guy I’m making this website for, wanted every parent page to be children of themselves.

    Another example on the structure, if you’re still in doubt:

    Homepage
    Animals
    – Animals
    – Birds
    – Lions
    – Elephants
    Funny Facts
    Great Buildings
    – Great Buildings
    – A Great Building
    – Another Great Building
    Contact me

    Let me try to rephrase. ??

    Does the actual page structure need to be this way, or simply the navigation menu?

    Thread Starter Valdemar

    (@kebablover)

    Just the navigation menu of course.. I’m sorry i wasn’t precisely enough.
    I really appreciate that you’re trying to help me, though it isn’t easy. ??

    Just the navigation menu of course

    Oh, well that’s easy! ??

    Be sure that your Theme supports the core Navigation Menus feature, then just go to Dashboard -> Appearance -> Menus, and create a menu with whatever structure you want, and assign it to the desired Theme Location.

    Thread Starter Valdemar

    (@kebablover)

    Oh! That’s easy! Thanks!!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Include parent page in the child-, possible?’ is closed to new replies.