Wordpress: sort into sub-pages, then sort by tag

Posted by redconservatory on Stack Overflow See other posts from Stack Overflow or by redconservatory
Published on 2010-03-25T19:20:50Z Indexed on 2010/03/25 19:23 UTC
Read the original article Hit count: 683

Filed under:
|

I have a wordpress page with two or three sub-pages ("TV", "WEB", "WATCH") and I would like to have the sub-page links on the page itself.

So, far, I can pull the sub-pages the following way:

<?php
$children = wp_list_pages('title_li&child_of='.$post->ID.'depth=1&echo=0');
if ($children) { ?>

<ul>
<?php echo $children; ?>

</ul>
<?php } ?>

However, is there a way to loop through $children so I can pull each link by it's tag?

i.e. using has_tag('tv'), has_tag('web')

Between the wordpress conditional tags and php, I am not sure how to write this.

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about php