Forum Replies Created

Viewing 30 posts - 31 through 60 (of 121 total)
  • Author
    Posts
  • Hi Rikard, you may close this. Thanks!

    Hey Ismael, I appreciate your help. And the code works like charm – as always. So thanks a lot!

    All the best,
    Daniel

    in reply to: disable fade in for overlay menu #1348998

    You can see this effect on the page mentioned, actually it is already there (file attached). The menu items appear one after another, even if this is “invisible” due to your css.

    If you for example start to position the elements by css this is executed later. Had this problem on other sites, but I don’t have an example because the desired look wasn’t achievable due to the gradual appearance of the menu items. So I always had to find other solutions or use the standard.

    in reply to: disable fade in for overlay menu #1348960

    Thanks for the explanation, then that will be the effect that you can definitely notice in some projects with large menus.

    in reply to: disable fade in for overlay menu #1348951

    But that is what I mean:

    the structure created in the DOM, because the mobile menu structure is only created after the burger menu is clicked

    The structure is created one menu item after another, not all at once.

    If you observe this line while clicking on the menu icon, you will see the items appear one by one:

    <div class="av-burger-overlay" style="display: block; opacity: 1;">

    in reply to: disable fade in for overlay menu #1348944

    True, it “works” on the specific sample page, but not in general. With your code added the menu seems to be showing all its items directly, but if you look into the developer tools you see that they are still loaded one after another, only without a visible animation. If you have more complex menu layouts problems might occur due to positioning the items only after they are proberly rendered (seems to be defined by a time setting). Therefore I still think it is not sufficient to only alter the css to get rid of the partially building of the menu structure.

    in reply to: disable fade in for overlay menu #1348830

    As kalimeromax stated in 2020 (see above): “Your code just disabled the fade effect, but it still loads the list items after each other.”

    Think it would be necessary to alter a menu script anywhere – or am I wrong?

    in reply to: disable fade in for overlay menu #1348355

    Want to chime in, the animation of the full overlay menu is indeed sometimes causing some trouble.

    If the menu is used in full overlay the menu entries:
    <li class="av-active-burger-items"><a>XXX</a></li>
    are loaded one after another in an animation.

    On some pages that is looking quite nice, on others (with larger menus) it would be better to see the full menu at first glance, without the animation.

    The animation comes from the code of the theme (no plugins or odd loading as mentioned above).

    Any ideas on how to disable that? Just adding transition:none is not changing anything …

    in reply to: Standard Setting for Video Element #1347601

    Hey Ismael, my question is answered, you may close this. Cheers, Daniel

    in reply to: How To Make The SubMenu Sticky On Mobile #1347600

    Since latest Enfold update all of Guenni007’s files are working fine. With standard child-theme shortcode loading as described in the documentation.


    @Ismael
    : I am testing the files for some weeks, in my opinion everything is working fine without the !important

    in reply to: Standard Setting for Video Element #1344707

    @Guenni007: Danke für deine wiederholte Hilfe hier im Forum! Das mit dem Einbinden habe ich verstanden, hattest du mir auch für den Sticky Header an anderer Stelle erläutert, sehr hilfreich! Du warst ja auch im Thread zum Sticky Menü aktiv, dort habe ich deine Lösung nachgebaut und bis jetzt immer noch nicht verstanden, warum bei mir in der speziellen Installation bzw. Konstellation der normale Code zum Überschreiben von Shortcode-Files nicht funktioniert. In der entsprechenden functions.php habe ich diese beiden Codes (von dir übernommen) drin, die jeweils Theme-Bestandteile aus anderen Ordnern laden lassen:

    add_action( 'wp_enqueue_scripts', 'wp_change_sticky_header_script', 100 );
    function wp_change_sticky_header_script() {
       wp_deregister_script( 'avia-sticky-header' );
       wp_enqueue_script( 'avia-sticky-header-child', get_stylesheet_directory_uri().'/js/avia-snippet-sticky-header.js', array('avia-default'), $vn, true);
    }
    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths)
    {
      $template_url = get_stylesheet_directory();
          array_unshift($paths, $template_url.'/shortcodes/');
    
      return $paths;
    }

    Den zweiten musste ich jedoch anpassen, damit die 3 Menü-Dateien richtig geladen werden:

    add_filter('ava_builder_shortcode_files_loaded', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths){
    $template_url = get_stylesheet_directory();
      array_unshift($paths, $template_url.'/shortcodes/');
      return $paths;
    }

    Wenn ich den normalen Code aus der Dokumentation nehme zerschießt es immer das korrekte Styling. Sobald auf einer Seite ein Sticky Menü ist wird alles oberhalb des Menüs noch richtig dargestellt, alles darunter lädt das korrekte CSS nicht mehr. Ismael sagte mir bereits, dass mein Code zum Überschreiben des Verzeichnis nicht richtig sei, er funktioniert jedoch nur so (dann sieht auch alles richtig aus), wenn ich den originalen Code verwende klappt es wie gesagt bei mir nicht wie bei dir …

    Hältst du es für möglich, dass das am Zusammenspiel der beiden Codes für Sticky Header und Sticky Menü liegt? Es wird ja einmal auf /js und einmal auf /shortcodes verwiesen. Die 1 Datei für den Header liegt in /js, die 3 Dateien fürs Menü liegen direkt in /shortcodes (kein weiterer Unterordner, oder ist das das Problem?). Hab schon versucht beides in einen Ordner zu legen, hat aber auch nicht wirklich geklappt.

    Ist vermutlich aus der Ferne schwer zu beurteilen, dachte aber ich frag dich mal.

    Viele Grüße, Daniel

    in reply to: Standard Setting for Video Element #1344705

    Hi Ismael, thank you for the clarification. In case of changing a shortcode file with a theme update, is there a corresponding note in the changelog?

    in reply to: Standard Setting for Video Element #1344570

    I understand that and did it like that. But what happens if you have new code in video.php? The filter loads my child theme version of the file so your possible additions or changes can’t come through, or am I wrong?

    in reply to: Standard Setting for Video Element #1344496

    What do I have to do if there are changes in video.php in parent theme (with an update of Enfold)?

    in reply to: Standard Setting for Video Element #1344495

    That works as expected. Thanks a lot!

    in reply to: How To Make The SubMenu Sticky On Mobile #1343581

    Strange. Only in this way it works as intended. The one other code that interferes with styles and the child theme is this (from Guenni007 too):

    add_action( 'wp_enqueue_scripts', 'wp_change_sticky_header_script', 100 );
    function wp_change_sticky_header_script() {
       wp_deregister_script( 'avia-sticky-header' );
       wp_enqueue_script( 'avia-sticky-header-child', get_stylesheet_directory_uri().'/js/avia-snippet-sticky-header.js', array('avia-default'), $vn, true);
    }

    As mentioned above, everything works on my end, just not with avia_load_shortcodes. It is not added to the site in any other way or twice in the functions.php …

    Is that a problem?

    In the end I don’t want to interfere with Guenni007’s question at the devs (post-1342985), I just wanted to give a short notice to others having the same problem that the code is not working, but maybe it is just me having this malfunction.

    in reply to: How To Make The SubMenu Sticky On Mobile #1343467

    Hey Ismael, I don’t know why, but in my tested installation only this code works as expected:

    add_filter('ava_builder_shortcode_files_loaded', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths){
    	$template_url = get_stylesheet_directory();
      	array_unshift($paths, $template_url.'/shortcodes/');
      	return $paths;
    }

    The code from the documentation does interfer with loading the correct stylesheet for the rest of the page …

    My question was directed @Guenni007, I just wanted to understand his note to the devs better (see post-1342985). I just wanted to know if it would be sufficient to only load the menu.js in the child theme if the “!important” was omitted in parent theme.

    in reply to: How To Make The SubMenu Sticky On Mobile #1343105

    I understand that. The question was if we would just have to load menu.js in the child theme if in the parent theme were no !important-rules?

    in reply to: How To Make The SubMenu Sticky On Mobile #1342987

    On my end it worked with the pictures too but content in the color sections lost its custom styling. After I changed to ava_builder_shortcode_files_loaded it was as shown in your example. At first I thought it was a problem with the older template files, thats why I made your changes in the 4.9 files again, but the problem was still there. So you still loaded the /shortcodes folder with the code form the documentation?

    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths)
    {
      $template_url = get_stylesheet_directory();
          array_unshift($paths, $template_url.'/shortcodes/');
    
      return $paths;
    }

    If the “!important” was omitted in parent theme it would be sufficient to only load the menu.js in the child theme, correct?

    in reply to: How To Make The SubMenu Sticky On Mobile #1342980

    Thought so too but I tested it with your code and the files did not load correctly …

    in reply to: How To Make The SubMenu Sticky On Mobile #1342886

    Hey Guenni, since Enfold changed parts of the shortcode behaviour in Version 4.8.9 I changed your filter from this post to:

    add_filter('ava_builder_shortcode_files_loaded', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths){
    $template_url = get_stylesheet_directory();
      array_unshift($paths, $template_url.'/shortcodes/');
      return $paths;
    }

    I added your modifications to the latest theme files (Version 4.9) and it works as expected.

    If anyone wants to do the same just remember the correct filter.

    • This reply was modified 2 years, 9 months ago by spooniverse.
    in reply to: sticky submenu in mobile #1342885

    Hey Guenni, since Enfold changed parts of the shortcode behaviour in Version 4.8.9 I changed your filter from this post to:

    add_filter('<strong>ava_builder_shortcode_files_loaded</strong>', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths){
    $template_url = get_stylesheet_directory();
      array_unshift($paths, $template_url.'/shortcodes/');
      return $paths;
    }

    I added your modifications to the latest theme files (Version 4.9) and it works as expected.

    If anyone wants to do the same just remember the correct filter.

    in reply to: sticky submenu in mobile #1341843

    And for replacing this if-condition it is necessary to do all the stuff mentioned in the other entry?

    in reply to: Exclude Custom Post Type from Masonry Grid #1341616

    Nice, Ismael, thank you! Now I have:

    function avia_masonry_custom_query( $query ) {
    	unset($query['post_type']['slug']); // Exludes Custom Post Type by slug
    	$exclude_cat = array('category__not_in' => array( 1 )); // Excludes category by ID
    	$query = array_merge((array)$exclude_cat, (array)$query);
    	return $query;
    }
    add_filter('avia_masonry_entries_query', 'avia_masonry_custom_query');

    That works as expected. You may close this thread as resolved.

    • This reply was modified 2 years, 9 months ago by spooniverse.
    in reply to: How to set a standard excerpt? #1341607

    Bessere Lösung als mit dem Script. Danke dir!

    in reply to: Set transparent header as default header style #1341443

    Hey MIke,

    I know that the class is only added if the option is enabled. But as mentioned above (and written in the theme backend) the class it is missing from mobile – but I need it there. Thanks for spotting the mistake in the code snippet. It is working now, the class is added on mobile too.

    Best regards,
    Daniel

    in reply to: Exclude Custom Post Type from Masonry Grid #1341436

    Hey Ismael,

    now I have written to filters:

    function avia_masonry_custom_cat_query( $query ) {
    	$exclude_cat = array('category__not_in' => array( 1 ));
    	$query = array_merge((array)$exclude_cat, (array)$query);
    	return $query;
    }
    add_filter('avia_masonry_entries_query', 'avia_masonry_custom_cat_query');
    
    function avia_masonry_custom_tax_query( $query ) {
    		$query['tax_query'][] = array(
    			'taxonomy'  => 'kanal_zuordnung',
    			'field'     => 'id',
    			'terms'     => array('30', '31'),
    			'operator'  => 'NOT IN'
    		);
    	return $query;
    }
    add_filter('avia_masonry_entries_query', 'avia_masonry_custom_tax_query');

    The Category and Taxonomy Terms are now excluded. Works fine. Two questions:

    • Can I somehow exclude the complete Custom Post Type or do I have to define the Terms that should be excluded from masonries (like in the code above)?
    • Can I combine the two filters into one?

    Best regards,
    Daniel

    in reply to: Set transparent header as default header style #1341129

    I found a script like this in the forum, but it is not working on mobile:

    function add_custom_script(){
    ?>
    <script>
    (function($){
        $(window).scroll(function() {    
        var scroll = $(window).scrollTop();
    
        if (scroll >= 50) {
            $("#header").addClass("header-scrolled");
        } else {
            $("#header").removeClass("header-scrolled");
        }
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Any other idea why I can’t finde the class on mobile? I know that the settings say that this option “is ignored on smartphones”, but it would be nice to have the class for styling purposes.

    in reply to: Set transparent header as default header style #1341126

    Sorry, but I think of one additional question while working with a transparent header: Why is “.header_scrolled” missing on mobile? I made the header sticky. Works well. It is transparent and if I scroll down it gets a white background. But on the larger sizes the class “.header_scrolled” is added and I can use it for additional styling. Any ideas why the class is missing and how I can get it back an small screen sizes?

    in reply to: Set transparent header as default header style #1341096

    Now I understand the difference. I think the description in the documentation should be clearer. The code there applies only to new pages (but the setting is changeable later).

    Thanks again! Thread may be closed.

Viewing 30 posts - 31 through 60 (of 121 total)