Ready to get started?Download WordPress


[resolved] multiple instances of wp_list_pages (3 posts)

  1. borzoid
    Posted 4 years ago #

    I'm working on a template for a site and need some pages listed in the top navigation and the rest in the sidebar. Of those in the side bar I need 3 different styles and a divider between some of them. So is it possible to use multiple instances of the wp_list_pages (using "include" for the pages I want) and give each instance it's own css styles?

    what would the syntax be?

    Thank you for your help

  2. as you need to wrap each template tag into an unordered list tag ul you can give a different class to each of the lists:
    for instance:

    <ul class="pagelist-1">
    <?php wp_list_pages('title_li=&include=3,9,27'); ?>
    <ul class="pagelist-2">
    <?php wp_list_pages('title_li=&include=5,7,11'); ?>



  3. borzoid
    Posted 4 years ago #

    Thank you very much. Exactly what I was looking for.

Topic Closed

This topic has been closed to new replies.

About this Topic