• Resolved aaron9999

    (@aaron9999)


    I am using this code:

    `<?php $page_hours = get_page_by_title( ‘Hours’ ); ?>
    <?php $page_parking = get_page_by_title( ‘Parking’ ); ?>
    <?php $page_directions = get_page_by_title( ‘Directions’ ); ?>

    <div class=”entry-content”>
    <?php echo apply_filters( ‘the_content’, $page_hours -> post_content ); ?>

    <?php echo apply_filters( ‘the_content’, $page_parking -> post_content ); ?>

    <?php echo apply_filters( ‘the_content’, $page_directions -> post_content ); ?>
    </div>

    But I always want to not only get the pages content, I want to get the page’s title. This only displays the paragraph content of the page.

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Thread Starter aaron9999

    (@aaron9999)

    <?php echo apply_filters( 'the_title', $page_hours -> post_title ); ?>

    I figured out what I was looking to do. Thanks.

Viewing 1 replies (of 1 total)

The topic ‘get page by title?’ is closed to new replies.