Forum Replies Created
-
AuthorPosts
-
But could I somehow disable the SVG icons? I have some pages with a lot of icons and different colors for them set in CSS as
color:
. Now I would have to change that tostroke:
or am I wrong?Best regards,
DanielNice! That is the final code I am using to load only the logo as SVG-file and use SVG paths for the rest:
function avf_no_inline_svg_mod($attachment_id, $url) { $logo_url = avia_get_option( 'logo' ); if ($url && $url == $logo_url) { return true; } return false; } add_filter('avf_no_inline_svg', 'avf_no_inline_svg_mod', 10, 2);
Nice! Pretty shure I tried this and it didn’t work but never mind. Glad about the code. Thanks! You can delete the linked image.
A last question about the hook: Can I somehow load the logo url from the theme settings? In the Enfold theme options I link to the logo file and if I could refer to the given path there I would not have to change it in the code in the functions.php. Like:
$logo_url = URL FROM THEME OPTIONS;
Any chance to do so?
All the best,
DanielSorry, I tried different itterations but none of them loads the logo as file. I don’t want the logo to be loaded as path. How can I achieve that?
Hi Ismael,
that is the right direction. How can I write the
if
part if the logo is not in the library? Because I don’t have a ID for the logo …Any idea?
All the best,
DanielHere I got the code from Rikard: Post #1327639
Is there a hook to tie it only to the logo?
Hi Ismael,
that’s quite obvious in the end. I could have come across that myself. Sorry! This code was shared here in the forum when you started to embed the logo as SVG directly.
I want the logo as SVG not to be used in paths. The file should be loaded. Therefore I have the code in all my pages.
Can I adapt it somehow? So that it only affects the logo, not the entire homepage? Because otherwise I have the problem with the icons and they can be used as a path because of me.
Is there a filter for the code so that (only) the logo is integrated as a file (SVG) and not as a path?
I look forward to your support. Thanks a lot!
Best regards,
DanielHi Ismael,
sorry for delay. Did quite some testing. I have the problem with the missing icons on all Enfold installations I am managing and where I did the update. I rolled it back and afterwards tried it with some fresh installations in different browsers, cleared cache and so on. I can’t deactivate the svg option and can’t see icons …
That is the case for preselected icons (like the scroll up arrow for example) and in the pagebuilder. If I select an icon element the first section “SVG Iconset: Entypo Fontello (Default)” is empty and shows nothing.
You find some credentials in private to a new project with the error in full display. Hope you can help me!
Best regards,
DanielHi Ismael,
I am sorry but no change at all. Tried all of the options in the performance settings. Emptied browser cache, opened in a private window. The Icons are even missing on two fresh installations …
Any ideas on what to do?
All the best,
DanielFound a post you put into an other thread and I think this is the way:
add_filter('avf_header_setting_filter', function($header) { $header['header_transparency'] = 'header_transparent header_hidden'; $header['header_class'] .= " av_header_transparent header_hidden"; return $header; }, 10, 1);
Now the header is gone 🙂
Hey Guenni007, can I tweak you code to deactivate the header for all pages:
add_filter('avf_header_setting_filter', function($header) { $header['header_transparency'] = 'header_transparency'; $header['header_class'] .= " av_header_transparency"; return $header; }, 10, 1);
Use something like:
add_filter('avf_header_setting_filter', function($header) { $header['hidden_eader_transparency'] = 'hidden_header'; return $header; }, 10, 1);
There is an option in the meta box to choose that deactivates the header for a single page. Therefore it should be possible with the filter – or am I wrong?
Kind regards
DanielHi Ismael, thanks for your quick reply. Has there ever been a question or request like that here in the forum? Couldn’t fine one but maybe you can search in a different way or know of a similar topic.
March 19, 2025 at 4:40 pm in reply to: Change Search Icon to Search Field – only for expanded menu #1479728Sorry Guenni007 for not letting you know, that your wizardry did the trick. Fiddled a bit with the CSS and it works. Thanks a lot! Please excuse the long waiting time.
All the best,
DanielThanks for your fast reply! Any idea on a schedule?
Hi Ismael,
I do have the same problem on several installs. After the last update nearly everything in the frontend and backend is in English. Before the update I had ‘German’ as language selected. Any idea on what the problem ist?
Best regards,
DanielDecember 23, 2024 at 1:45 pm in reply to: Change Search Icon to Search Field – only for expanded menu #1474182Hi Ismael,
your code is going in the right direction. Unfortunately, it does not yet work as desired. A search icon is added to the mobile menu at the end, which is not quite the behavior I want to achieve.
Regarding your question: My code works. It comes here from your forum and I use it on several pages. It works as follows:
Desktop: Search field instead of icon in the menu
Mobile: NeitherWhat I want to achieve:
Desktop: Search field instead of icon in the menu (as with my code)
Mobile: Magnifying glass icon next to the lines of the hamburger menu. So basically the same as it is in your standard.Can I change my code so that it only affects the normal menu (used for desktop) and the mobile menu remains unchanged? Perhaps that would be a simpler solution than defining something specially for the mobile. What do you think? Is there a corresponding restriction that I could use?
Christmas greetings,
DanielPerfect! Thanks a lot.
Hi Guenni, do you know if there is a filter or anything to set a custom percentage? The list stops at 90%.
Nice! Thanks a lot. You may close this.
All the best,
DanielHi Yigit, thank you for the workaround! How is the roadmap for integrating the filter for this? Will anyone post here once it is shipped or will I find it in the changelog? And: Can I make your suggested change in a child theme?
Hi Mike, thank you for the short response. I still need to enable shortcodes in the shop description. Any idea on when you will have a solution for me?
February 20, 2024 at 8:58 am in reply to: Deactivate duplicate post link for all post types #1434864That makes sense. Thanks, Mike! You may close this.
Ok. You may close this.
Hey Mike, the second version is the one I already used. I wrote: “I could load it again, if I would want to. No problem.” But thanks anyway.
My question is: Do I have to use this filter and make changes to the excerpt? Is there a filter to alter the Masonry overlay directly? Without my detour? Couldn’t find any more filters to check or try. Any ideas?
Hi Mike,
I altered a filter Ismael once gave me:
add_filter('avf_masonry_entry_content', function($content, $entry, $config) { $color = get_post_meta( $entry['ID'], 'ACF-COLOR', true); $content = '<div class"acf-color" style="background-color:' . $color . ';"></div>'; return $content; }, 10, 3);
And added some CSS:
#top .av-caption-style-overlay .av-masonry-item-with-image .av-inner-masonry-content { background: transparent; } #top .av-caption-style-overlay .acf-color { position: absolute; height: 100%; width: 100%; top: 0; left: 0; margin: 0; z-index: -1; opacity: 0.7; }
Now I have the color as overlay. Works as intended. I am missing the excerpt, because the filter overwrites it. But I could load it again, if I would want to. No problem. So I think that is proof of concept. Ok?
My question is: Do I have to use this filter and make changes to the excerpt? Is there a filter to alter the Masonry overlay directly? Without my detour? Couldn’t find any more filters to check or try. Any ideas?
Hi Mike, the described functionality with the sorting function via a field registered with ACF is definitely possible. I use this on several websites, I got the code for it from Ismael. So as I said, I assume that I could basically get to ACF content to use it in Masonry. Or is that only possible with the blog post element?
I know how your mentioned solution is implementable with CSS and the categories. But it would not be the optimal solution for me, because it is just too rigid. Changes can then only be made in the CSS code …
Is there no other idea to get to a stored color info than with hard coded CSS?
Hi Mike, could I get the color from the category? In the HTML code of a Masonry I can see all categories attached as css-classes? I can set colors for the categories (as enfold does with products for example). Can I load them into the masonry?
And: It is possible to register an field genereted with ACF to use it in the Masonry sorting options (Ismael once provided a code for me). So it is somehow possible to load ACF data from a post. Why not the color?
Hey Nikko, I know how to set the color with CSS. But what I want to achieve is that the color for the overlay is loaded from the respective post. Here is an example:
Post 1: ACF color picker: #000
Post 2: ACF-Color-Picker: #fff
Post 3: ACF color picker: #efefefAll posts are loaded and displayed in a masonry. Now the overlay of post 1 should have the color #000, the overlay of post 2 the color #fff and so on.
I use the Masonry element with the title as overlay setting. How do I get the color to use it automatically for the overlay?
Hey Mike,
I will give it a try – but the menu will be hard coded in the end, or am I wrong? Within the submenu shortcode I can specify a flexible menu based on WordPress settings. That would be a welcomed feature.
Any idea on why the shortcode isn’t working? Because for me it breaks the layout everywhere, not only on single posts or archives with a sidebar, as you asumed. A page with an added submenu only looks good if the submenu is created with the ALB.
All the best,
DanielHey Günter,
thank you for getting back to me and thanks for the code snippet.
So instead of
if( $query->is_search )
I would somehow check if it is a certain post type archive instead ofis_search
– correct? The rest of the code is the same? Could I write something likeif( $query->is_tax('test')
and later on define which post type is the only one to query in this archive?Best regards,
Daniel -
AuthorPosts