Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   Weird Error With Code in Loop as Opposed to index.php (http://forum.bytesforall.com/showthread.php?t=3800)

adum Oct 9, 2009 09:51 PM

Weird Error With Code in Loop as Opposed to index.php
 
Hey,

I was trying to put this code in the loop (center column)

<?php if ( is_front_page() ) { ?>
<div align="center">
<?php include (ABSPATH . '/wp-content/plugins/dynamic-content-gallery-plugin/dynamic-gallery.php'); ?>
</div>
<?php } ?>

The plugin is for an image slideshow type thing, shows latest 5 posts from a determined category.

Anyway the slideshow loads up but following it, the 5th post gets posted on the front page, above the latest post (it takes over the number 1 position).

However when I put this code in index.php that error does not occur and it works fine.

Do you know if there is any reason why that error could have occured? I don't know if it's the plugin or Atahualpa causing that problem. Works in index.php but not in the loop.

juggledad Oct 10, 2009 04:48 AM

possibly because the code resets the wp-query. you may want to put this code in the 'Content ABOVE the LOOP' section - it will run, then the loop will run


All times are GMT -6. The time now is 01:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.