Using AJAX to get content outside the loop
-
Hey everyone,
I’m installing an AJAX tab using Dynamic Drive (http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/). The script is designed to pull content from different pages that are located in a different folder and not in the WordPress loop. I have it setup on my website (http://controlalttv.net) and click on podcasts. It loads a page from /front/podcasts.php.The script that I use on that page:
<?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=54&paged=$page&posts_per_page=10"); ?> <?php while (have_posts()) : the_post(); if ($post->ID == $displayed) continue;?> <div id="post-<?php the_ID(); ?>" class="posts"> <div id="info"> <div class="title_box"></div> <div class="titler"><div class="title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></div> <div class="meta">Posted: <?php the_time('l, F j, Y - g:i A') ?> CT</div> </div></div> <div class="content"><p><?php the_excerpt(); ?></p></div> </div> <?php endwhile; ?>
On the front page (index.php), I get this error:
Fatal error: Call to undefined function get_query_var() in /home/gregschu/public_html/CTVgs/front/podcasts.php on line 2
Any ideas on how to fix this? All help will be greatly appreciated.
Thanks,
Gregory
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Using AJAX to get content outside the loop’ is closed to new replies.