This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Mouseover in Layout Builder

  • Creator
    Topic
  • #1612
    myked79
    Member

    Hello, I am trying to get a simple mouseover effect to work in a Raw Content box in a column in the homepage. However it doesn’t appear to be working there. I can add it as a floating widget, which then it does work, but I get the box around my image.

    Any ideas on why it wont work there?

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #1617
    Jason Bobich
    Keymaster

    Hello,

    I am trying to get a simple mouseover effect to work in a Raw Content box in a column in the homepage.

    This is a little vague, so I’m not totally sure how to answer. Can you link me to example of what you’re doing? Or possibly expand on this statement a bit?

    #1622
    myked79
    Member

    something like this (from another site ive built so ignore the shortcode.
    http://picturestack.com/973/951/48HScreenShotsod.png

    • This reply was modified 7 years, 9 months ago by myked79.
    • This reply was modified 7 years, 9 months ago by myked79.
    • This reply was modified 7 years, 9 months ago by myked79.
    #1635
    Jason Bobich
    Keymaster

    These are not attributes you can use within any of the theme’s elements. They will get filtered out every time. See the following tutorial for adding them in from your Child theme:

    http://www.jasonbobich.com/theme-forest-updates/expanding-accepted-html-tags-in-the-theme-blvd-wordpress-theme-framework/

    function my_allowed_tags( $tags ) {
    	$tags['a']['onmouseover'] = array();
    	$tags['a']['onmouseout'] = array();
    	return $tags;
    }
    add_filter( 'themeblvd_allowed_tags', 'my_allowed_tags' );
    #3073
    myked79
    Member

    This is that I put into my Child Theme functions.php file:

    <?php
    /*——————————————————-*/
    /* Run Theme Blvd framework (required)
    /*——————————————————-*/

    require_once ( TEMPLATEPATH . ‘/framework/themeblvd.php’ );
    function my_allowed_tags( $tags ) {
    $tags[‘a’][‘onmouseover’] = array();
    $tags[‘a’][‘onmouseout’] = array();
    return $tags;
    }
    add_filter( ‘themeblvd_allowed_tags’, ‘my_allowed_tags’ );

    /*——————————————————-*/
    /* Start Child Theme
    /*——————————————————-*/

    // Start the party …

    // Add stylesheet – Level 4, will get added after EVERYTHING
    themeblvd_add_stylesheet( ‘custom_styles’, get_stylesheet_directory_uri().’/assets/css/custom.css’, 4 );

    Did I do something incorrect?

    #3098
    Jason Bobich
    Keymaster

    Looks right to me.

    #3113
    myked79
    Member

    Yeah. Unfortunately its still not working. Any ideas?

    #3115
    Jason Bobich
    Keymaster

    Looking at your screenshot again, your onmouseover and onmouseout are on the image tag, opposed to the anchor it looks like. So, it’d be this:

    function my_allowed_tags( $tags ) {
    	$tags['img']['onmouseover'] = array();
    	$tags['img']['onmouseout'] = array();
    	return $tags;
    }
    add_filter( 'themeblvd_allowed_tags', 'my_allowed_tags' );

    I’m still not sure if it will work 100%, but hopefully that’ll get you closer.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The forum ‘Akita Responsive WordPress Theme’ is closed to new topics and replies.