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:
<body> <div id="frame1"> blablabla </div> <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...)')); ?> </div> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?> #######end of the php include###### </div> <div if="frame2"> This is where I'd like the title and date to show. </div>
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 https://www.karlotta.com
- The topic ‘Loading date and title in a different zone than the content’ is closed to new replies.