Blog Post Feature Image Link to Post Instead of Lightbox

pending (7 posts) (4 voices)

  1. brookebot

    (Note: I am using a child theme just in case it matters.)
    I have a page with blog posts in a grid. Currently, when clicked, the blog post featured image pops up in a lightbox. I would like the blog post featured image to link directly to the actual post instead of popping up in a lightbox. How can I do this?
    Thank you Elliot! :)

    Posted 4 years ago #
  2. Elliott

    Hello brookebot,

    This is another one of those customizations that needs to be done in the parent theme. Open up /wp-content/themes/[your_theme]/lib/functions/image.php and change lines 66 - 67 from this,

    'link_to' => $link_to,
    'prettyphoto' => $prettyphoto,

    To this,

    'link_to' => get_permalink(),
    'prettyphoto' => false,
    Posted 4 years ago #
  3. brookebot

    I do not want to make any changes to the parent theme (I don't want to lose my changes when a theme update rolls around).
    Is there a way I can do this via my child theme functions.php?

    Posted 4 years ago #
  4. Elliott

    Like I said, advanced customizations like these will need to be done in the parent theme. I would create a small changelog of your customization to remember to do them after an update.

    Posted 4 years ago #
  5. wesleysoccer

    Thanks for this...huge help.

    Posted 4 years ago #
  6. After updating my theme (Modular to 2.5) and then applying this fix (as I have had in the past)... the post image now opens to the full size image instead of linking to the actual post. Is there another fix for this?

    Posted 3 years ago #
  7. Elliott

    Perhaps you edited the wrong file or forgot to upload it. Send us a link and let us know exactly which image it is.

    Posted 3 years ago #


You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme