• Resolved marques_uk

    (@marques_uk)


    Hi,

    I was wondering if anyone knew a solution to the problem I’m having.

    I have found some code that does exactly as I want, please see below.

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    and then displaying <ul><?php js_list_pages_include_tree('include_tree=10'); ?></ul> in the page.

    This code can be found Here!

    How would I amend this funtion so that the main pages are links as well? If anyone could help me with this that would be great.

    I’m also looking to style this but I’m guessing I can style the main page list as norm and for the children if I add a class to the list in the function, I can style this from here?

    Thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter marques_uk

    (@marques_uk)

    Thanks esmi, but found a solution to my problem, I found this code in another thread.

    $page_ids = array(1,2,3);
    foreach($page_ids as $page_id) {
      $page = wp_list_pages("echo=0&title_li=&include=$page_id");
      $submenu = wp_list_pages("echo=0&title_li=&child_of=$page_id&depth=1");
      if($submenu) $page = str_replace("</li>", "<ul>$submenu</ul></li>", $page);
      echo $page;
    }

    Click Here!

    Does exactly what I wanted, thanks dougwaltman.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Page List and Page Children’ is closed to new replies.