I am using the 'query_posts' to alternate loops of info on a page for an intranet I'm working on. It works in Firefox and displays both queries. But in IE it only shows the result of the first query, not the second.
Here is the bit of code that I'm using. Anyone see any reason why IE wouldn't show the second query?
<?php
if (have_posts()) :
echo 'Physicians:';
while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a>
<?php endwhile; else:
endif;
wp_reset_query();
echo ''; ?>
<?php query_posts("post_parent=734&category_name=$slug&showposts=125&orderby=title&order=ASC");
if (have_posts()) :
echo 'Staff:';
while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a>
<?php endwhile; else: echo ''; endif;
wp_reset_query();?>
hi
what you describe is more likely to be an IE6 css issue that is causing IE6 to fail to render the 2nd loop.
In general the server will server up the same code for all browsers - its how those browsers choose to display that code that is variable.
check your source on both browsers to see if they match - if it really is different then rule out local caching in IE6.
Look also for conditional IE CSS tags - they are a common cause of confusion when debugging (for me at least)
z
thanks Zeniph. I'll check the source on these and post back.
Yes, they are showing different source code when I compare the two. Where can I learn more about what might be causing this? Here is the part of the code in question:
http://pastebin.com/d6fb2b3
Out of all of that, IE6 will only show this:
<div id="leftcol">
Locations:
</div> <!-- END LEFTCOL -->
cant see pastebin entry
I guess check your PHP code for something similar to this
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') {
IE specific code blalh blah
} else {
code for other browsers
}
thats how serving up different code for IE would be done but I somehow dont think its going to solve your problem.
this HTML code:
<div id="leftcol">
Locations:
</div> <!-- END LEFTCOL -->
doesnt seem to relate to the initial PHP code you posted so its hard to know whats going on.
z