Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #439977

    Hello,

    I saw this post concerning images in general on a website, but I wondered if the image title can be removed via CSS for masonry blog layout.

    Here is a picture highlighting what I’d like to remove.

    Thanks so much!

    #440536

    Hi happinessplunge!

    It looks like switched the style and are not using the Masonry anymore. To remove it in your current style open up /enfold/includes/loop-index.php and change line 134 from this.

    $blog_meta_output = "<a href='{$link}' class='small-preview' title='{$featured_img_desc}'>".$slider.$icon."</a>";
    

    To this.

    $blog_meta_output = "<a href='{$link}' class='small-preview'>".$slider.$icon."</a>";
    

    Best regards,
    Elliott

    #440576

    Hi Elliott!

    Thanks so much for your quick reply. Unfortunately, removing that title bit didn’t do anything. The title remains.

    You can see an example here

    Any other thoughts?

    Thanks!.

    #440579

    Hi!

    Please add following code to Functions.php file in Appearance > Editor

    function add_custom_tooltip(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery('a').removeAttr('title');
    jQuery('img').removeAttr('title');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_tooltip');

    Regards,
    Yigit

    #440584

    Hi Yigit!

    Thanks so much. It worked like a charm and I could return loop-index.php back to its original version as well.

    Thanks so much for the help!!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Hide image title in masonry blog’ is closed to new replies.