Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other WP – Clickable featured image

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #34455
    revok
    Participant

    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

    #87759
    TheDoc
    Member

    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?

    #87800
    revok
    Participant

    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' => '' ) ); ?>










    #87798
    TheDoc
    Member

    I feel like you could do something like:

    " rel="fancybox">
    #87830
    Johnnyb
    Member

    Isn’t the easiest way to do it just to wrap the thumbnail in the permalink?

    " />

    #87831
    TheDoc
    Member

    @Johnnyb – he’s trying to open up the lightbox, not link to the page that you’re already on.

    #88108
    revok
    Participant

    hmmm…it doesn’t seem to work.


    @TheDoc

    " rel="fancybox">

    clicking the featured img now reloads the page and doesn’t activate the fancybox.

    …any suggestions?

    Simon

    #88109
    TheDoc
    Member

    Blast. Okay, give this one a go:

    " rel="fancybox">
    #88118
    revok
    Participant

    Still the same I’m afraid.

    Do you think i’m doing simething wrong?


























    '' . __( 'Pages:', 'twentyten' ), 'after' => '' ) ); ?>










    #88126
    TheDoc
    Member

    What is it outputting?

    #88064
    revok
    Participant

    The same as before – it reloads the page when clicking the featured image

    #88175
    TheDoc
    Member

    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?

    #88205
    revok
    Participant

    ok.

    The images are attached as a gallery inside the post, and the fancybox is a wp-plugin.

    #88238
    TheDoc
    Member

    Well, I’d say this is my final suggestion. I have no idea why it wouldn’t be working:
    ID); ?>">

    #88276
    revok
    Participant

    It doesn’t work either i’m afraid.

    too bad

    I guess it has something to do with the plug-in?

























    '' . __( 'Pages:', 'twentyten' ), 'after' => '' ) ); ?>










Viewing 15 posts - 1 through 15 (of 19 total)
  • The topic ‘WP – Clickable featured image’ is closed to new replies.