Support » Fixing WordPress » Loading date and title in a different zone than the content

  • Hello!

    This is awfully complicated, so I don’t know that anyone can help me, but just in case:

    I only show 1 post on my index page. That page is made outside of WP, and the content from WP is loaded into the page through a php include (I removed header and footer).

    The css div that contains the php include must only show the post (usually, a photo). But I would like to show the date and title of the post on the page too, just NOT IN THAT PHP INCLUDE (in the css div that’s right below it.)

    Is that possible?

    Here is my html right now:

    <div id="frame1">
    <div id="include">
    ###########This is where the WP content loads through the index.php template which looks like this:#########
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="storycontent">
    		<?php the_content(__('(more...)')); ?>
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    #######end of the php include######
    <div if="frame2">
    This is where I'd like the title and date to show.

    See what I mean?

    Is that doable?

    Many thanks for any help you can give me!

    PS: if you want to see my website, it’s at

Viewing 2 replies - 1 through 2 (of 2 total)
  • It’s not so complicated. 🙂

    I assume that this is the index.php from your theme directory.

    If you can write <?php the_content ?>, you can also write <?php the_date(); the_title(); ?> etc.

    Thanks – that wasn’t working, though, since the div in which I was trying to have the date show wasn’t part of the WP template. It was breaking the loop. I re-coded the whole entire site so that it would work – now the whole site is in WP!

    Thank you for replying!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Loading date and title in a different zone than the content’ is closed to new replies.