WordPress.org

Ready to get started?Download WordPress

Forums

The Subtitle
Pulling in child pages, display their sub title? (2 posts)

  1. unexploded
    Member
    Posted 1 year ago #

    Hi there, I'm pulling in a list of pages, listing them using the following code:

    <?php
    $child_pages = $wpdb->get_results("SELECT *    FROM $wpdb->posts WHERE post_parent = 29    AND post_type = 'page' ORDER BY menu_order", 'OBJECT');    ?>
    <ul class="team-list"><?php if ( $child_pages ) : foreach ( $child_pages as $pageChild ) : setup_postdata( $pageChild ); ?>
    <li class="team-list">
      <div class="child-name">
     <a href="<?php echo  get_permalink($pageChild->ID); ?>" rel="bookmark" title="<?php echo $pageChild->post_title; ?>"><?php echo $pageChild->post_title; ?></a>
    </div></li>
    <?php endforeach; endif;
    ?></ul>

    I'm trying to pull in the sub title, but I can't seem to get it to work.

    Any help would be much appreciated.

    Thanks

    http://wordpress.org/extend/plugins/the-subtitle/

  2. WebEndev
    Member
    Posted 1 year ago #

    You are echoing the post_title twice, but I'm not seeing the_subtitle?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.