Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1476575

    Hi,
    is there some CSS to remove lightbox opening of the feature image on a blog post, and on the blog page?
    Currently the feature image is linking to itself. I would rather have no link as this gets in the way, and on the blog page it doesn’t link to the blog – jus the image. Link below.
    I can see you have functions.php code available for this but I would like CSS if possible. Or have I missed a setting somewhere?
    Thanks,
    Anne

    #1476599

    Hey Anne,

    Thanks for writing in.

    You can add this code in the Quick CSS field to disable the link of the featured image.

    .big-preview.single-big .avia-post-format-image a {
        pointer-events: none;
    }

    Please toggle or temporarily disable the Enfold > Performance > File Compression settings after adding the modification.

    Best regards,
    Ismael

    #1476607

    Brilliant! Just what I needed. Love your support as always,
    Anne

    #1476612

    that filter set in child-theme functions.php removes the anchor and onty the image is inserted instead.

    add_filter( 'avf_post_ingnore_featured_image_link', '__return_true' );
    

    btw. that filter can be selective to posts from f.e. categories:

    function custom_avf_post_ingnore_featured_image_link( $ignore_image_links ){
      //  e.g. available variables
      global $avia_config, $post_loop_count;
    
      $ignore_image_links = in_category( array( 1, 'grafik' ) ) ? true : false;
      return $ignore_image_links;
    }
    add_filter( 'avf_post_ingnore_featured_image_link', 'custom_avf_post_ingnore_featured_image_link', 10, 1 );
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.