WordPress.org

Forums

wp_list_pages - Active state (2 posts)

  1. dipankarbanerjee
    Member
    Posted 1 year ago #

    Hi,

    I have a list of child page generated with...

    <?php
    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) { ?>

      <?php echo $children; ?>

    <?php } ?>


    Can anyone suggest how to assign a Active state to these links,
    example: like active state of menu items.

    Warm Regards

    Dipankar

  2. alchymyth
    Forum Moderator
    Posted 1 year ago #

    the function automatically generates .current-... classes;

    http://codex.wordpress.org/Function_Reference/wp_list_pages#Menu_Item_CSS_Classes

Topic Closed

This topic has been closed to new replies.

About this Topic