September 13, 2021 at 10:17 am #1320688September 14, 2021 at 6:59 am #1320845
Thank you for the inquiry.
This is possible, but you have to modify the enfold/config-templatebuilder/avia-shortcodes/magazine/magazine.js file. Look for this code around line 26.
And below, add this code.
window.location.hash = decodeURI(current.outerText).toLowerCase();
Please toggle or temporarily disable the Enfold > Performance > File Compression settings after doing the modification.
IsmaelSeptember 14, 2021 at 9:17 am #1320860
can I put the modified file in the child folder or it has to be in the enfold one?
ThanksSeptember 14, 2021 at 9:27 am #1320861
Hello again. I tried to put it in the child folder and doesn’t work.
In the original folder it works but there is a little issue
As you can see here if you click on the filters you see the # filled with %20 instead of spaces. I need to have a talking url, like this
Plus if i just copy the genereted url once i clicked on a filter es.
and paste in a new window the filter is not triggered as should be. So I find myself in the regular page with a strange url.
Thank you in advance.September 15, 2021 at 12:01 pm #1321023
Unfortunately, you will not be able to override this in the child theme without editing the shortcode file directly. You have to add the following snippet in the functions.php file to create a new shortcode path in the child theme, copy the magazine.php file and modify the script path in the extra_assets function.
To convert the %20 characters to a hyphen, try to replace the previous code using the following snippet.
window.location.hash = decodeURI(current.outerText).toLowerCase().replace("%20", "-");
IsmaelSeptember 16, 2021 at 6:07 pm #1321271
I tried what you said but i have some difficulty.
After i added the new “shortcodes” folder into my child theme and added the function in the child theme should I recreate the path of the magazine folder completely?
and put in this folder both, the php and the js files?
After this on the php i should change the path line on the php for the js like this?
wp_enqueue_script( ‘avia-module-magazine’, AviaBuilder::$path[‘pluginUrlRoot’] . ‘shortcodes/config-templatebuilder/avia-shortcodes/magazine/magazine.js’, array( ‘avia-shortcodes’ ), false, true );
What am I missing?September 17, 2021 at 6:52 am #1321319
Thank you for the update.
You have to place the magazine/magazine.php file inside the shortcodes folder within the child theme directory. That is the new avia-shortcodes folder. So the new folder structure would be yourchildtheme/shortcodes/magazine/*(magazine shortcode files including php, js etc). And yes, you have to adjust the script path in the wp_enqueue_script function.
You must be logged in to reply to this topic.