Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #193539

    Hi,

    I want to keep the big feature image in blog post but i don’t want it to be clickable. At the moment when you hoover on it it change color and there is the little circle telling you you can click on it to open it and I don’t want that..

    How can I do?

    Kind regards,

    Delphine

    #193719

    Hey Delphiine!

    What type of Blog Style do you have right now? Can you please give us a link to the blog page? Add this on your custom.css or Quick CSS:

    .big-preview.multi-big a {
    pointer-events: none;
    }

    Regards,
    Ismael

    #193843

    Hi Ismael,

    The code is not working because I use the grid blog.

    I tried

    .big-preview.grid-big a {
    pointer-events: none;
    }

    but it’s not working as well..I don’t know which class you use for the grid blog. ;-)

    My site is on maintenance mode.

    Kind regards,

    Delphine

    #195240

    Hi!

    The pointer-events css attribute is not supported by all browsers and I recommend to modify the single post template directly. Open up /wp-content/themes/enfold/includes/loop-index.php and replace

    
            //echo preview image
            if(strpos($blog_style, 'big') !== false)
            {
                if($slider) $slider = '<a href="'.$link.'" title="'.$featured_img_desc.'">'.$slider.'</a>';
                if($slider) echo '<div class="big-preview '.$blog_style.'">'.$slider.'</div>';
            }
    

    with

    
            //echo preview image
            if(strpos($blog_style, 'big') !== false)
            {
                if($slider) echo '<div class="big-preview '.$blog_style.'">'.$slider.'</div>';
            }
    

    The code modification removes the link around the image and the user can’t click on it anymore.

    Regards,
    Peter

    #195346

    Hi,

    Thanks. I have two questions though.
    If I don’t want this change to be erased by a new update, knowing that I made a child theme, do I have to put a copy of loop-index.php in my child theme or copy the whole “include” file?

    And if I include other images but inside my post, will they still be clickable?

    Kind regards,

    Delphine

    #195723

    Hi!

    Yes, you need to copy the includes folder including the loop-index.php file.

    Regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘how to make the big feature image in blog post non clickable.’ is closed to new replies.