Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #19496

    Hello there,

    I am looking to change how the “link to this post” for featured images behaves. Currently the featured image on the front page slider links to the article when I choose this option. This is what I want it to do. HOWEVER, in the article itself, the featured image is a lightbox.

    How can I make it so that the featured image “links to this post” on the front page slider, but has no link and no lightbox on the actual post page?

    Thank you!



    Not sure how can this be done. Let me tag the rest of the support team.




    @haurys – I have the same issue and was just about to ask the same question! I am currently getting around the default behavior by changing the “link to this post” option to “link manually” and then entering the full link to the post.

    This pretty much creates the desired result (image on portfolio and/or home page slider links to post, but image on post no longer has the lightbox link to itself)… but it’s not quite ideal because:

    a) on individual post, I want NO link on the image ideally, and

    b) it’s a pain in the butt to have to enter every image’s link manually and then worry about keeping them accurate if URLs change, etc.

    Here’s hoping someone can provide something we can add to functions.php or something which will remove the lightbox feature entirely from the individual post images while allowing us to use “link to this post” for the beneficial home page slider link, etc. There has to be some function kriesi wrote which adds the individual page’s lightbox functionality, so hopefully there’s something we can throw in functions.php which overrrides it.



    Ok, there may be an easier way but for my purposes, this worked exactly as I want. I ended up editing includes>loop-page.php (I have the velvet theme, so sorry if it doesn’t match up with other themes’ structure).

    Toward the top, where it says:

    //call the function that displays featured images and slideshows within posts
    $slider = new avia_slideshow($this_id);
    echo $slider->display_small($avia_config['size']);

    I changed it to say:

    //call the function that displays featured images and slideshows within posts
    // $slider = new avia_slideshow($this_id);
    // echo $slider->display_small($avia_config['size']);

    That gave me what I wanted. I hope it works for you, or else maybe the support team has a better idea.


    Open up includes/helper-slideshow.php and replace following line:

    $image = avia_get_link($slide, 'slideshow_', $image_string, $this->post_id);


    if( isset($slide['slideshow_link']) && !($slide['slideshow_link'] == 'self' && (is_singular() || $this->post_id == avia_get_the_ID() )) )
    $image = avia_get_link($slide, 'slideshow_', $image_string, $this->post_id);


    Dude – Thanks for your reply. For some reason, the code you provided makes the images no longer load on the post. It just gives the spinning wheel logo (as if its loading) but it never ends up displaying the image.

    Chembro – Thanks for your reply, but the Lightbox still came up on the page when I used your method. The code structure seems to be different between these two themes so that’s probably why it didn’t work.



    The code should work – can you post a link to a single post please?

    Best regards,



    I would send a link, but the site is ‘under construction’ and can’t be accessed until launch without an account, etc etc.

    At any rate, i got it to work by changing the “apply links to the image if that’s what the user wanted” section to:

    //apply links to the image if thats what the user wanted
    $image = avia_get_link($slide, 'slideshow_', $image_string, $this->post_id);

    $output .= "<li class='featured featured_container".$counter++."' >";

    $output .= "<a href='".get_permalink( $id )."'>";

    $output .= $image;

    Also by changing $output .= "</li>"; to $output .= "</a></li>";

    It will only work if the image is set to “No Link” on the post page. This is a bit of a roundabout way but it works well for me.




    Glad that you solved it this way. I thought about this solution but I prefer not to change the framework files (if possible).



Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Featured image "link to this post" behavoiur’ is closed to new replies.