Some of my template tags are playing up, and they have left me confused.
On one site, that has been live for over a year without any of these issues, on all the pages that have custom query loops, the_content() was repeating the first entry. I replaced that line with echo get_the_cotent($post->ID), which I thought was totally equivalent, and it solved the problem.
Now, I have a very similar issue with another site. Trying to fetch and display content from child pages, I have this code block:
global $post;
$my_wp_query = new WP_Query();
$all_wp_pages = $my_wp_query->query(array('post_type' => 'page'));
$children = get_page_children($post->ID,$all_wp_pages);
foreach($children as $child){
?>
<div class="childPage">
<h3><?php the_title($child->ID); ?></h3>
</div>
<?php
}
but this just repeats the title of the parent page.
However, if I replace the_title with echo get_the_title( is works as expected.
I am only assuming these are comparable issues, the certainly have similar symptoms and solutions.