Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7608161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:50:50+00:00 2026-05-31T00:50:50+00:00

I am not very skilled in php, but I believe something in this section

  • 0

I am not very skilled in php, but I believe something in this section is causing my Fancybox images to duplicate.

When Fancybox opens, the user can use the Next and Prev links, but each image is duplicated twice. I have tested by replacing fancybox with another lightbox and the problem still persists.

Does anyone see the issue in this, have any ideas how to fix or hack it?

<?php
    $work_count = 0;
    $recent_work_args = apply_filters( 'evolution_recent_work_args', array(
        'showposts' => (int) get_option('evolution_posts_work_num'),
        'category__not_in' => (array) get_option('evolution_exlcats_work')
    ) );
    $recent_work_query = new WP_Query( $recent_work_args );
    while ( $recent_work_query->have_posts() ) : $recent_work_query->the_post();
        ++$work_count;
        $width = apply_filters( 'evolution_home_work_width', 203 );
        $height = apply_filters( 'evolution_home_work_height', 203 );
        $titletext = get_the_title();
        $thumbnail = get_thumbnail($width,$height,'item-image',$titletext,$titletext,true,'Work');
        $thumb = $thumbnail["thumb"];
        $lightbox_title = ( $work_title = get_post_meta($post->ID, 'work_title',true) ) ? $work_title : $titletext;
        $work_description = ( $work_desc = get_post_meta($post->ID, 'work_description',true) ) ? $work_desc : truncate_post( 50, false );
?>
        <div class="r-work<?php if ( 0 == $work_count % 5 ) echo ' last'; ?>">
            <?php print_thumbnail($thumb, $thumbnail, $titletext, $width, $height, 'item-image'); ?>
            <span class="overlay"></span>
            <a href="<?php echo esc_url($thumbnail['fullpath']); ?>" class="zoom fancybox" title="<?php echo esc_attr( $lightbox_title ); ?>" rel="work_gallery"></a>
            <a href="<?php echo esc_url($thumbnail['fullpath']); ?>" class="zoom fancybox" title="<?php echo esc_attr( $lightbox_title ); ?>" rel="work_gallery"></a>
            <p><?php echo esc_html( $work_description ); ?></p>
        </div> <!-- end .r-work -->
<?php endwhile; wp_reset_postdata(); ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T00:50:51+00:00Added an answer on May 31, 2026 at 12:50 am

    Well, for one, you’re outputting two links to the thumbnail:

            <a href="<?php echo esc_url($thumbnail['fullpath']); ?>" class="zoom fancybox" title="<?php echo esc_attr( $lightbox_title ); ?>" rel="work_gallery"></a>
            <a href="<?php echo esc_url($thumbnail['fullpath']); ?>" class="zoom fancybox" title="<?php echo esc_attr( $lightbox_title ); ?>" rel="work_gallery"></a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not very skilled in web developing by the moment but i've managed to
I'm not yet a skilled programmer but I thought this was an interesting problem
I am not very familiar with perl, but I am wondering if this would
Not very sure how to word this question but I'll give an example. $string
I'm still not very good with data structures, but I have this homework assignment
Not very technical, but... I have to implement a bad words filter in a
I am not very good with Regex but I am learning. I would like
I'm not very used to programming with flags, but I think I just found
Sorry the title is not very clear. This is a follow up to my
I am not very skilled in Perl, and I am trying to use FSA::Rules.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.