Trying to implement this plugin with fancybox
-
I’m having some trouble trying to implement this plugin with fancybox jquery plugin. Basically the idea is when the user click the featured image post it will display the image on the secondary featured image. Here is the code that i’m working on
Right now the “href” is blank at the moment and have tried different approach but all ended up in failure.
`<a class=”fancybox” href=””><?php if ( has_post_thumbnail()) { $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), ‘large’); echo ‘<img src=”‘ . $large_image_url[0] .
This is what it looks like when i place this code inside the href
<?php MultiPostThumbnails::get_the_post_thumbnail(get_post_type(), 'secondary-image'); ?>
https://i255.photobucket.com/albums/hh140/testament1234/Fancyboxproblem_zps82c6a090.jpg
But the image that should be display is this
https://i255.photobucket.com/albums/hh140/testament1234/second-image_zpsfb2bd810.jpg
- The topic ‘Trying to implement this plugin with fancybox’ is closed to new replies.