WordPress.org

Support

Support » Themes and Templates » How to output pages's parent

How to output pages's parent

  • How to output pages’s parent?
    eg.
    pages, a, b and c, these parent is A. How to output pages’s parent as

    if this page is a “Home > A > a”,
    if this page is b “Home > A > b”,
    if this page is c “Home > A > c”,

Viewing 3 replies - 1 through 3 (of 3 total)
  • the answer lies somewhere in the wp_list_pages

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

    I am looking for the same thing. Hopefully I’ll figure it out soon

    I’ve found a solution that works great, I just had to figure out that this is called a breadcrumbs menu -_-

    http://chrispoole.com/breadcrumbs

    I’ve found a solution that works great, I just had to figure out that this is called a breadcrumbs menu -_-

    http://chrispoole.com/breadcrumbs

    thanks, But it si not working perfectly. Just is:

    Home ยป a or b or c

    is not is Home Home > A > a or b or c

    I use another way:

    <span>Home</span> > <?php if ( is_page(array(5, 8)) ) { ?><?php wp_page_menu(‘include=2&title_li=’);?><?php } ?>

    It is working, but

    <?php wp_page_menu(‘include=2&title_li=’);?>

    has CSS in it with html style

    <div class=”menu”>

      <li class=”page_item page-item-2 current_page_ancestor current_page_parent”>page-2

    </div>

    How can I drop

    <div class=”menu”>

      <li class=”page_item page-item-2 current_page_ancestor current_page_parent”>

    and

    </div>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to output pages's parent’ is closed to new replies.
Skip to toolbar