• I am having lots of problems trying to accomplish something…

    Basically I am using pages to have a list of, say, associates. Associates can have products (subpages). Since I have many other pages for other purposes, I preferred to have a page that encloses all them: Products of the Associates.

    So…

    + Products of the Associates
    + —- Associate 1
    + ——— Product 1
    + ——— Product 2
    + —- Associate 2
    + —- Associate 3
    + ——— Product 1
    + ——— Product 2

    I want to produce a list of childs of “Products of the Associates” but I dont want the visitor to be able to click on “Associate”, only its Products. Ideally “Associates” are displayed as <h2> headers.

    I have researched many forums, lived in Google an entire day and tried many different solutions myself… all in vain.

    Is anyone out there able to think on this dilemma?

    Kind regards,
    — Ex

Viewing 2 replies - 1 through 2 (of 2 total)
  • Use multiple wp_list_pages, shown here with the subpages of associate pages ID 44 and 45.

    <h1>Products of the Associates</h1>
    <ul>
    <?php
    wp_list_pages('child_of=44&title_li=<h2>' . __('Associate 1') . '</h2>' ); ?>
    </ul>
    <ul>
    <?php
    wp_list_pages('child_of=45&title_li=<h2>' . __('Associate 2') . '</h2>' ); ?>
    </ul>

    http://codex.wordpress.org/wp_list_pages

    Thread Starter excessus

    (@excessus)

    Thanks Iridiax. The problem is, howerver, that the Associate lists should be pulled automatically from the database, so you can add associates and erase them at will without having to touch the code. It’s being a really painful problem… 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘customizing list_pages’ is closed to new replies.