WordPress.org

Ready to get started?Download WordPress

Forums

How to output pages's parent (4 posts)

  1. 610216
    Member
    Posted 3 years ago #

    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",

  2. bebecaca
    Member
    Posted 3 years ago #

    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

  3. bebecaca
    Member
    Posted 3 years ago #

    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

  4. 610216
    Member
    Posted 3 years ago #

    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>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags