Support » Themes and Templates » PHP query to display content of additional page

  • Resolved DJJoshee

    (@djjoshee)


    Hi there,

    I’ve been using wordpress for some time now, and have done a few templates but built them on top of exisiting ones. I have come to the stage where I’m doing a fully customized one. You can see the demo at http://josh.r2x2.com/josh/bgg

    My issue is that I need to be able to get the content of a Page named “Home 2” into the right hand column. The left hand column is currently populated with the default index.php code and from the backend I’m using a “static” front page. So my question is how to write perhaps the WP_Query(”) to grab the content for the second column, or there also seems to be a get_page_by_title() funtion that isn’t all that well documented.

    Thanks in advance.

    Cheers

Viewing 1 replies (of 1 total)
  • NM,
    <?php
    $rightcolum = get_page_by_title(‘Home 2’);
    setup_postdata($rightcolumn);
    ?>
    <div class=”entry”>
    <h2><?php the_title(); ?></h2>
    <?php the_content(); ?>
    </div>

Viewing 1 replies (of 1 total)
  • The topic ‘PHP query to display content of additional page’ is closed to new replies.