Forums
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi
I have a question on how to make my featured image clickable.
example
http://www.nordarchitects.dk/featured/healthcare-center/
On this page i would very much like to be able to activate the gallery by clicking the featured image.
Is there any way to do this?
Thanks
Simon
Oooooo an interesting query.
You probably can, though the ease of that depends on how your page is currently structured. Can you post the code for the template in question?
Here’s the code for my single page template.
Let me know if you need more.
echo get_post(get_post_thumbnail_id())->post_excerpt; ?>
'' . __( 'Pages:', 'twentyten' ), 'after' => '' ) ); ?>
I feel like you could do something like:
" rel="fancybox">
@Johnnyb – he’s trying to open up the lightbox, not link to the page that you’re already on.
hmmm…it doesn’t seem to work.
" rel="fancybox">
clicking the featured img now reloads the page and doesn’t activate the fancybox.
…any suggestions?
Simon
Blast. Okay, give this one a go:
" rel="fancybox">
Still the same I’m afraid.
Do you think i’m doing simething wrong?
What is it outputting?
The same as before – it reloads the page when clicking the featured image
I meant the HTML, but I was able to check.
Are the images not attached to the post? How are you creating the gallery via the built-in WordPress functionality?
ok.
The images are attached as a gallery inside the post, and the fancybox is a wp-plugin.
Well, I’d say this is my final suggestion. I have no idea why it wouldn’t be working:
ID); ?>">