Avada Forums Community Forum Customize portfolio plugin files

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • dudat
    Participant
    Post count: 1

    Hi all,
    I succesfully tried to edit the code from the file that generates the “Portfolio” element in Fusion builder, to make it show the “Skill” taxonomy after the regular Category taxonomy.

    To do that, I edited in a couple of lines the file plugins/fusion-core/shortcodes/fusion-portfolio.php, and I achieved what I needed.
    But we all know that editing plugins files is really really bad (especially the fusion-core plugin, that gets updated often) so I’m trying to bring the code somehow inside my child theme folder to make it upgrade-safe.

    After reverting the plugin file to the original code I tried the easy ways (putting the edited file inside Avada-Child-Theme/fusion-core-shortcodes/) and the more proper ways (pasting the relevant code in functions.php) but nothing works.
    The lines of code I added are just before and just after the fusion_portfolio_shortcode_content hook, but just pasting it doesn’t seem to override the original code.

    Does anybody know how can I customize this?

    Thanks in advance,

    dat

    lamechky
    Participant
    Post count: 1

    Hi dat,
    I am just wondering if you could fine any solution for your issue?
    Running into the same issue!

    Thanks,
    Rob!

    c0nsult0r
    Participant
    Post count: 8

    Hi me too, any help?

    Jan Burger
    Participant
    Post count: 1

    Same problem here. Any ideas?

    emanuelechiari
    Participant
    Post count: 1

    Same of you guys… nobody from Themefusion???

    anchormen
    Participant
    Post count: 3

    Any success with this? I’m looking to do the same. Support told me to edit the files direct. But as mentioned, the files will get overridden when the plugin updates.

    So how to achieve this Avada support?

    harleyj
    Participant
    Post count: 2

    Any update on this? I need to override the standard builder shortcode templates. WPBakery Page Builder has this functionality. How can we achieve it with the Fusion builder?

    harleyj
    Participant
    Post count: 2

    For anyone else struggling to override Fusion shortcodes, I’ve managed to wrangle a solution. I would love to see something a bit easier to use, e.g. Fusion Builder checks for the existence of a template file before using its own render function, however it appears that the shortcodes are constructed in such a way that it’s not so simple.

    Step 1: Add to your child theme’s functions.php

    
    // child-theme/functions.php
    // ...
    
    add_action('fusion_builder_shortcodes_init', function(){
    	require 'inc/fusion-overrides.php';
    }, 100);
    
    // ...
    

    Step 2: Create the inc/fusion-overrides.php file. In this file, paste in whatever elements that you plan on overriding.

    <?php
    // child-theme/inc/fusion-overrides.php
    
    require 'fusion-button.php';

    Step 3: Copy the fusion-button.php from the plugin folder: wp-content/plugins/fusion-builder/shortcodes/fusion-button.php

    Step 4: Delete the fusion_element_button function from your copy of the file (line 1076 onwards):

    
    // ...
    	}
    
    	new FusionSC_Button();
    
    }
    
    // DELETE EVERYTHING BELOW THIS LINE
    
    /**
     * Map shortcode to Avada Builder.
     *
     * @since 1.0
     */
    function fusion_element_button() {
    
    	global $fusion_settings;
    
    	$standard_schemes = [
    // ...
    

    Step 5: Done! Your custom child-theme/inc/fusion-button.php should now be overriding the default output. If you’re looking to specifically change the output, you’ll want to edit the render() function. For me, I wanted to remove the wrapping <div> from fusion buttons, so that I could have them display adjacent of each other without having to resort to columns.

    I understand there’s probably other ways to achieve the same result, but I thought I’d share a way that worked for me.

    mensa-sonora
    Participant
    Post count: 1

    Thx Harleyj for the tip !
    I did what you describe (but for fusion-events). It looks like this new file is not overriding the original.
    I really don’t know anything in php. But perhaps there is something to change in the lines for the functions.php ?
    I just changed the way styles were enqueued, it seems it was the last update 7.2.1 that was making the problem.
    I wonder if it’s not the same with your code.
    Is it still working fine for you after the last update ?
    Do you have a solution if not ?

    Thanks !

    mpernkopf
    Participant
    Post count: 6

    Hy there,

    I am also struggling with an override which worked perfectly before updating (show venue in events teaser), and I found out, that somehow the newest Fusion Builder Plugin update (not the theme or fusion core) breaks my functionality.

    As pointed out from harleyj above I
    1. call my override file in functions.php

    add_action('fusion_builder_shortcodes_init', function(){
    		require 'inc/the-events-calendar-overrides.php';
    }, 100); 
    

    2. in my the-events-calendar-overrides file I put copied code from fusion-events (with changes in line 449)

    
    $html .= '<h4>' . tribe_events_event_schedule_details_override() . '</h4>';
    

    and the tribe_events_event_schedule_details_override function (where I add the venue).

    I already spent hours on investigating what may affect this, but no solution up so far. Maybe the way to call an override function changed with the latest updates (like the array(‘avada-stylesheet’) to [] change for enqueuing styles).

    Regards, M

    priworks
    Participant
    Post count: 5

    In my case, I was trying to change the Fusion Builder’s recent post heading tag. I can confirm that harleyjs’ solution does in fact work, after much consternation, finally a solution. Avada please make this a visible part of your documentation, it took way too long to simply change a heading tag.

    KimVinberg
    Participant
    Post count: 1

    I tried to overwrite a shortcode, but the code above didnt work. i managed to get it working by doing this:

    add_action( ‘init’, ‘remove_my_shortcodes’,20 );
    function remove_my_shortcodes() {
    remove_shortcode( ‘fusion_portfolio’ );
    require ‘inc/fusion-portfolio.php’; // this is my custom portfolio
    }

    And inside my custom portfolio i changed the name: from:
    class FusionSC_Portfolio to class FusionSC_Portfolio_custom

    the 3 places it was used. now its overwriting it

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.