• Hi,

    I am using this code:

    if($post->post_parent)
    		$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
    		else
    		$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
    		if ($children) { ?>
    		<ul>
    		<?php echo $children; ?>
    		</ul>

    That gives me code like this:

    <em><ul>
    <li class="page_item page-item-17"><a href="permalink" title="case 1, print ad">case 1, print ad</a></li>
    <li class="page_item page-item-15 current_page_item"><a href="permalink" title="case 1, tv ad">case 1, tv ad</a></li>
    </ul></em>

    I want to style the list depending on the content. Is it possible to add some code into the list-tag? Like the “ID=’PRINT'” in this code:

    <li class="page_item page-item-17" ID="PRINT"><a href="permalink" title="case 1, print ad">case 1, print ad</a></li>

    Thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to add ID (or class) to list of page children?’ is closed to new replies.