Forum Replies Created
-
AuthorPosts
-
Hi Günter, great, that was it! Now it works. :-)
Thank you very much!PS: I tried to modify magazine.php directly (that worked after all) and would like to put the modified file into my child theme directory to avoid it being overwritten on Enfold udates.
The original file path is: \wp-content\themes\enfold\config-templatebuilder\avia-shortcodes\magazine\magazine.php
I tried every possible subdir structure in the child theme folder, but to no avail. I placed the modified magazine.php in each of the following folders:- \wp-content\themes\enfold-child\config-templatebuilder\avia-shortcodes\magazine\magazine.php
- \wp-content\themes\enfold-child\avia-shortcodes\magazine\magazine.php
- \wp-content\themes\enfold-child\magazine\magazine.php
- \wp-content\themes\enfold-child\magazine.php
The file is not recognized there. Is it possible at all to put a modified shortcode file into the child theme folder?
Thanks.January 8, 2022 at 3:40 pm in reply to: Upcoming events element: Change and translate link text of all events link #1334788Oops, sorry, I forgot that I had once (long ago) customized this element and extended it’s output by that link myself. Found it, all is well. ;-)
Hi Ismael,
Thanks for your help and advise!
I chose to override the avia_woocommerce_frontend_search_params function in the child theme’s functions.php. This gives us the flexibility regarding sort options and their style of display we need.
Best Regards,
StephanHi Ismael,
Thanks for your reply. I want to remove some of the sort options that are not needed.
If I change the config file, will the changes be persistent? Would I have to copy that file into the child theme subdir?
And if I would like to remove the sort options altogether, would it be sufficient to use that remove_action hook?
Thanks, StephanHi Nikko,
Thanks for your quick reply! It seems that the problem has actually solved itself. Perhaps it was a caching problem on the server…
However, I’m glad about it. :-)
Thanks and best regards!Hi Rikard,
Thank you very much. Then I have done everything right. :-)
Best Regards!@royaltask: Care to share your solution?
@royaltask: Do you use Google Maps? Maps load Roboto fonts on their own. Solution see post #958964 above.
@Günter: Wo muss ich denn den Filter “avf_output_google_webfonts_script” setzen und wie?
Danke!June 7, 2018 at 9:03 am in reply to: GDPR / Google Web Fonts Replacement / Host Google Webfonts locally #968280I am also interested to learn about how to implement avf_output_google_webfonts_script filter.
Thanks.@Shashahan: I would determine the css class of the affected elements and overwrite size and position in the style.css of your child theme (or in the Enfold Quick CSS settings).
OK, here’s the solution. Thanks to https://stackoverflow.com/questions/25523806/google-maps-v3-prevent-api-from-loading-roboto-font.
- Create a /js/norobotofontbymaps.js in your child theme folder.
- Put this code into norobotofontbymaps.js:
var head = document.getElementsByTagName('head')[0]; // Save the original method var insertBefore = head.insertBefore; // Replace it! head.insertBefore = function (newElement, referenceElement) { if (newElement.href && newElement.href.indexOf('//fonts.googleapis.com/css?family=Roboto') > -1) { console.info('Prevented Roboto from loading!'); return; } insertBefore.call(head, newElement, referenceElement); };
- Add this code to your functions.php:
/*prevent roboto fonts loaded by google maps api*/ $child_theme_url = get_stylesheet_directory_uri(); wp_register_script( 'norobotofontbymaps', $child_theme_url.'/js/norobotofontbymaps.js', 'jquery', "1", true); wp_enqueue_script( 'norobotofontbymaps' );
That’s it. No connections to fonts.googleapis.com anymore. :)
- This reply was modified 6 years, 7 months ago by Stephan_H. Reason: corrected a typo
I just filtered css files in the network and found this:
So it’s common.js that loads Roboto from fonts.googleapis.com.
And where is common.js located? Here: https://maps.googleapis.com/maps-api-v3/api/js/31/8d/intl/de_ALL/common.js.
So the Google maps load Google fonts. Plausible.
But how can I prevent that and force common.js to use the local font? Possible?
- This reply was modified 6 years, 7 months ago by Stephan_H. Reason: Removed obsolete information
May 18, 2018 at 6:48 pm in reply to: Embedded YouTube video has wrong dimension and orientation #958774OK, found it! :)
I had a customized video.php file in my child theme shortcodes folder. (It added a poster image field to the video element). Removed it. Now it works.Thank you for your help!
StephanNow I have to add the poster image field code to the new video.php again…
May 18, 2018 at 6:37 pm in reply to: Embedded YouTube video has wrong dimension and orientation #958767With your code in the quick css it works! But why is this? Should work without any extra css code, shouldn’t it?
May 18, 2018 at 6:00 pm in reply to: Embedded YouTube video has wrong dimension and orientation #958747@Guenni007: I’m native German, but many readers here won’t be, so I thought it best to write in English to the benefit of all who may experience the same video problem. ;-)
I updated the theme from the WP backend (Enfold -> Theme Update).
I just fiddled to get rid of google fonts. Wondered why the fonts path used in my child theme’s style.css wouldn’t be recognized. I had to disable “CSS file merging and compression” setting in the Enfold performance options. Only then it worked and my local fonts are used.
I also use
add_action( 'init', 'enfold_customization_switch_fonts' ); function enfold_customization_switch_fonts() { global $avia; $avia->style->print_extra_output = false; }
in my child theme’s function.php. But still there is a Roboto font loaded from fonts.googleapis.com (https://fonts.googleapis.com/css?family=Roboto:300,400,500,700). I cannot find the source of this request. Website in question is https://www.rsw-recht.de/
Any help?
Thanks,
StephanMay 18, 2018 at 4:22 pm in reply to: Embedded YouTube video has wrong dimension and orientation #958656@Guenni007: Ja, bei dir sieht das so aus wie es soll. :)
I have a 2/3 – 1/3 – page. The video is embedded in the 2/3 cell. Above the video is a text block, below is a separator element.
There are more strange video phenomena: On this page: https://www.anne-swoboda.de/puppenspiel/der-wunderbare-massenselbstmord/ we embedded a self-hosted video by script. It’s supposed to be contained in its 2/3 cell, but stretches full width. If we use the video element of Enfold instead, everything’s a mess: video rectangle is full width, but player elements are tiny and placed somewhere middle left, and all following elements in the same cell are missing.
@guenni007: Ah, guter Hinweis. Hier sind meine aktuellen Performance-Einstellungen:CSS file merging and compression: Disabled
Javascript file merging and compression: Disabled
Disabling of template builder elements: Always load all elements
Disable self hosted video and audio features: unchecked
Disable external video features: unchecked
Delete old CSS and JS files?: uncheckedOh, and we use a child theme.
- This reply was modified 6 years, 7 months ago by Stephan_H. Reason: Performance settings added
No, we didn’t and don’t use any Google maps API key inside the functions.php. We just set it up using standard Enfold interface.
@Ismael, @chiligroupharstad: Agreed. But there might be a number of use cases where a standard Google map simply is sufficient. This can then be done without having to deal with any Google API issues.
Hi Rikard,
Please see the link in the private content section.
Thanks,
StephanWhy, just set the size of the map according to your needs, copy the embedding iframe code and paste it into a text block. No rocket science. ;-)
But admittedly you don’t have much scope for design this way.- This reply was modified 6 years, 7 months ago by Stephan_H.
Alternatively you could embed a Google map without any API key.
May 15, 2018 at 2:44 pm in reply to: TinyMCE Missing Essential Buttons in Advanced Layout Builder Text Blocks #957026Hi Ismael,
Great, that works! :-) Thank you very much!
Cheers,
StephanMay 12, 2018 at 11:28 am in reply to: TinyMCE Missing Essential Buttons in Advanced Layout Builder Text Blocks #955663Hi Victoria,
Yes, that fixes the problem with the “TypeError: $.avia_utilities.supports is not a function”. Thanks a lot!
But now: How can I disable the ajax search feature? The search field that shows up when clicked on the magnifier icon in the menu bar should just receive keyword(s) and do nothing until Enter is pressed or the magnifier icon to the right of it is clicked.
The tip to comment out the line “
new $.AviaAjaxSearch({scope:'#header, .avia_search_element'});
” (line 35 in avia.js) doesn’t work.Thanks,
StephanMay 11, 2018 at 10:43 am in reply to: TinyMCE Missing Essential Buttons in Advanced Layout Builder Text Blocks #955160Hi Victoria,
I followed your advice but the error persists.
I placed the following files in my child theme folder:
\themes\enfold-child\functions.php
\themes\enfold-child\js\avia.js
\themes\enfold-child\js\shortcodes.jsIn functions.php I have the following function:
function wp_change_aviajs() { wp_dequeue_script( 'avia-default' ); wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true ); } add_action( 'wp_print_scripts', 'wp_change_aviajs', 100 );
When I log in to my WP backend, I get the error as described above. See screenshot of the backend in the private content section of this reply.
Thanks,
Stephan@Yigit, @Ismael: Adding CSS rules
display: none !important;
is no real solution, because it leaves the information in the source code.
@Mike: The child theme approach with a customized avia.js worked fine until Enfold version 4.3. Now it throws an exception error in the WP backend, even with an identical copy of the latest avia.js in the child theme folder.Cheers,
StephanMay 9, 2018 at 3:15 pm in reply to: TinyMCE Missing Essential Buttons in Advanced Layout Builder Text Blocks #953974Hi Victoria,
This is off topic, but following this hint I just commented out line 56 (
new $.AviaAjaxSearch({scope:'#header'});
). In the latest avia.js this is to be found in line 35.Following another hint I added the function wp_change_aviajs() to my function.php in order to use the altered avia.js file.
However, if I copy the unaltered (latest version of) avia.js into the child theme folder (js subdir) and leave the function wp_change_aviajs() in my functions.php (also in the child theme folder) then the WP backend throws an exception error (“TypeError: $.avia_utilities.supports is not a function”) and stops at line 513 in avia.js. It’s the avia.js in the child theme folder, identical with the avia.js in the theme folder.
If I comment out the function wp_change_aviajs() and the add_action command no error is thrown. But then, the child theme copy of avia.js isn’t used at all. How can a customized avia.js be used?
Should I start a new topic about this?
Original problem that lead to customize avia.js is: How can I deactivate the Ajax search?
Interesting additional issue now: Why does a copy of avia.js not work in the child theme dir?
Thanks,
Stephan- This reply was modified 6 years, 7 months ago by Stephan_H.
May 6, 2018 at 11:37 am in reply to: TinyMCE Missing Essential Buttons in Advanced Layout Builder Text Blocks #952302Hi Basilis,
I’m somewhat disappointed by the quality and professionality of the Kriesi support. Meanwhile I found out by myself what the cause of the editor problem was. Should have been easy for you as well if you just took the time and analysed the script error messages thrown on pageload in the WP backend I gave you credentials for.
Here is what I found out: I use a child theme and overrided js/avia.js (to alter the ajax search functionality). In my function.php I activated this customized version of avia.js by
function wp_change_aviajs() { wp_dequeue_script( 'avia-default' ); wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true ); } add_action( 'wp_print_scripts', 'wp_change_aviajs', 100 );
Now with the latest update of the theme came a new avia.js and the old wasn’t compatible anymore.
I replaced the js/avia.js in the child directory by the (unaltered) new version, but that threw an exception: “TypeError: $.avia_utilities.supports is not a function”. I had to comment out the function wp_change_aviajs() in my function.php to get rid of this.
Now the text block editor works again, but how can I override avia,js in my child theme to customize it?
Thanks,
Stephan- This reply was modified 6 years, 7 months ago by Stephan_H. Reason: corrected a typo
-
AuthorPosts