New Landing How can we help? Themeforest Theme Support Flexform How To: Replacing Love It Icon

Viewing 9 posts - 1 through 9 (of 9 total)
  • Posted in: Flexform
  • #6839
    fumblepigskin
    Member
    Post count: 21

    I figured out a way to replace the heart icon with any other font awesome icon without updating all the php files. Just add the following to the Tracking Code text box in the Flexform general options.

    
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script type="text/javascript">
    $( document ).ready(function() {
    $('i.icon-heart').removeClass('icon-heart').addClass('icon-thumbs-up');
    });
    </script>
    

    For whatever reason, you need to load the jquery library even though it should have already loaded, and I couldn’t quite figure out how to get it to serve the file from the wp-includes/js/jquery directory, hence why it is loaded from the google cdn.

    The above code works, but if anyone can figure out those two minor issues, that would be cool.

    Enjoy

    #6859
    Ben – SUPPORT
    Member
    Post count: 690

    How were you trying to target the js folder? That could have been your issue were you using ?

    Thanks
    -Ben

    #6975
    fumblepigskin
    Member
    Post count: 21

    I am not php savvy enough to do all that. I was just trying to get to the file this way:

    <script src="http://mywebsite.com/wp-includes/js/jquery/jquery.js"></script>

    #6994
    Cosmin – SUPPORT
    Member
    Post count: 3851

    Also, have you tried using the Raw JS element, instead of pasting the code in the Tracking Code option? I don’t think you’d need to call jQUery again + calling it twice can cause unexpected errors.

    Regards,

    ————————————————————————————————————

    Cosmin
    Support Assistant

    #7288
    fumblepigskin
    Member
    Post count: 21

    It is strange, when I don’t call it, the jquery code doesn’t work, when I do call it, it does. I know, weird.

    And I agree, it might cause unexpected errors. I have a pretty simple site, so i am not too worried about it. I haven’t seen any errors caused by it yet.

    I am sure it would work in the raw js element, but then I would have to put the code on every page, no?

    I’ll continue to fool with it and see if I can figure out why it is happening and post my results here.

    #7615
    Cosmin – SUPPORT
    Member
    Post count: 3851

    On second thought, try this custom CSS instead:

    .icon-heart:before{content:"\f087" !important;}

    Should swap the heart for the thumbs up symbol. You can refer to the FontAwesome reference for other symbol codes.

    Regards,

    ————————————————————————————————————

    Cosmin
    Support Assistant

    #8340
    fumblepigskin
    Member
    Post count: 21

    Just got around to testing this. Your solution is much better. Thanks very much!

    #51143
    dfgutierrez
    Member
    Post count: 2

    Hi, I don’t understand where I have to paste this custom CSS code, it’s a corporate website and the heart doesn’t look well

    #51452
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @dfgutierrez – you want to copy and paste it into the custom css box within the theme options panel.

    Hope that helps.

    – Ed

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

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

License required for the following item
Login and Registration Log in · Register