WordPress.org

Support

Support » How-To and Troubleshooting » Posts page – other content

Posts page – other content

  • Hey guys,

    I’m using WordPress as a CMS and have designated a posts page which displays the posts fine. What I’m looking to do is to display the post box content as well elsewhere on the page, but it doesn’t seem to want to play ball. Is this possible and if so, what php do I need to display it

    Cheers

Viewing 3 replies - 1 through 3 (of 3 total)
  • This is a bit hacky, but it works. Past this after your the get_header() call in your theme template and modify to suite your needs:

    <?php $post = get_page_by_path($GLOBALS['pagename']); ?>
    <?php setup_postdata($post); ?>
    <h1><?php the_title(); ?></h1>
    <?php the_content(); ?>
    <hr/>
    <?php rewind_posts(); ?>

    Hope this helps.

    -Mike

    p.s. To do it less hacky would require a lot more explanation. If you’d like to learn more we can probably do a better job of explaining over at http://wordpress.stackexchange.com.

    Thanks Mike, that works perfectly. StackExchange is bookmarked. I’ll be heading over there quite a bit I think!

    Glad it worked and that I could be of help. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Posts page – other content’ is closed to new replies.