easy fancybox inline is working on normal page but not working in search result
-
Guys,
I have the following issue:
On my normal pages/posts, the easy fancybox plugin is working just fine, but when I want to open the search results with a fancybox this will not open. can anyone tell me what I’m doing wrong?
The code I use for the normal page/post is:
<?php $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; $wp_query = new WP_Query( array( 'post_type' => 'shop', 'posts_per_page' => '5', 'orderby' => 'rand', 'order' => 'DESC', 'cat' => get_query_var('cat'), 'paged' => $paged )); ?> <?php if ($wp_query ->have_posts()) : while ( $wp_query ->have_posts() ) :$wp_query ->the_post(); ?> <!--Start Shop--> <li> <a href="#post-<?php the_ID(); ?>" title="<?php the_title(); ?>" class="fancybox-inline" id="inline"><?php if ( has_post_thumbnail()) { the_post_thumbnail('shops_post_thumbnail', array('class' => 'shops')); } ?></a> </li> <div class="fancybox-hidden"> <div id="post-<?php the_ID(); ?>" style="height:auto; width:600px;"> <?php the_content(); ?> </div> </div><!--End Shop-->
and the code for the search results, it is almost the same:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <!--Start Shop--> <li> <a href="#post-<?php the_ID(); ?>" title="<?php the_title(); ?>" class="fancybox-inline" id="inline"><?php if ( has_post_thumbnail()) { the_post_thumbnail('shops_post_thumbnail', array('class' => 'shops')); } ?></a> </li> <div class="fancybox-hidden"> <div id="post-<?php the_ID(); ?>" style="height:auto; width:600px;"> <?php the_content(); ?> </div> </div><!--End Shop-->
This worked for a while, but one way or another it stopped working!
I’ve tried with all other plugins disabled, butt no result.Any help will be appreciated in fixing this issue.
Thanks!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘easy fancybox inline is working on normal page but not working in search result’ is closed to new replies.