New Landing How can we help? Themeforest Theme Support Flexform Title Test not showing on image roll over

Viewing 11 posts - 1 through 11 (of 11 total)
  • Posted in: Flexform
  • #59566
    caitlinwynne
    Member
    Post count: 11

    Hi,

    I have added Title and Alt text to most of my images (on the homepage), however they are not showing up on mouse roll over.

    I inspected the code that is output, and it looks like the title and alt text aren’t even being output.

    Website URL: http://www.policeaccountability.org.au

    Username: Test
    Password: TestToday123

    #59567
    caitlinwynne
    Member
    Post count: 11

    Correction: Alt text is being output… but NOT the title text, which I NEED for the mouse rollover.

    Please help!!!!

    #59741
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please give me Administrator login detail to debug the issue .

    With Best Regards
    Swift Ideas

    #60519
    caitlinwynne
    Member
    Post count: 11

    I have made the above Test user administrator.

    Thanks.

    Website URL: http://www.policeaccountability.org.au

    Username: Test
    Password: TestToday123

    #60899
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    The developer of theme will assist you very soon .

    Thanks

    #60945
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    @caitlinwynne – these are included, just removed on load via jQuery to prevent the unattractive white hover over.

    If you wish to keep them, then simply edit /js/functions.js line 1007-1009 (remove these):

    jQuery('img[title]').each(function() {
    	jQuery(this).removeAttr('title');
    });

    – Ed

    #60963
    caitlinwynne
    Member
    Post count: 11

    Thank you ๐Ÿ™‚

    #60965
    caitlinwynne
    Member
    Post count: 11

    Sorry… but it’s only working for the homepage… I need it to work throughout the site.

    See here: http://www.policeaccountability.org.au/about/

    Here I have inserted images using the Swift Page Builder and the Single Image element. But the roll over Alt title isn’t coming up.

    Please help.

    Thanks again!

    #60988
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Seems this was removed by WordPress from their attachment function. You can try adding this code to the functions.php file:

    
    	/* ADD TITLE BACK TO ATTACHMENT
    	================================================== */
    	function add_title_to_attachment_image( $attr, $attachment ) {
    	    $attr['title'] = esc_attr( $attachment->post_title );
    	    return $attr;
    	}
    	add_filter( 'wp_get_attachment_image_attributes', 'add_title_to_attachment_image', 10, 2 );
    

    – Ed

    #61001
    caitlinwynne
    Member
    Post count: 11

    Thanks. That worked ๐Ÿ™‚

    #61016
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Thanks Ed .
    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register