Forum Replies Created

Viewing 30 posts - 6,631 through 6,660 (of 11,702 total)
  • Author
    Posts
  • hm – does not work on my end here !
    (maybe it is because of my webers-testseite and its child-theme functions.php with over 2000 lines of additional test snippets. But i guess there is something missing.
    Can you please post the whole thing you have done. The code f.e. in your child-theme functions.php.

    Or are you looking only for a solution of first-level menu ( with submenu ) closing? – Then your code is enough for it.
    i’m trying to close a second-level by clicking its siblings. This is often the case if you are having a mega menu with column headings and sub-menu under it.

    so there must be additional code .
    the “siblings-structure” is on sub-menu a bit different – maybe this will work:

    function only_one_submenu_open(){
    ?>
    <script>
    (function($) {
    $(document).ready(function(){ 
    	$('body').on( 'click touch', '.av-width-submenu > a', function () {
    		$(this).parent('li').siblings().removeClass('av-show-submenu');
    		$(this).parent('li').siblings().find('ul').slideUp( "fast");
    	});
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'only_one_submenu_open');
    • This reply was modified 6 years, 2 months ago by Guenni007.

    just one moment – on touch devices this must be adjusted …
    … hm could not find the clue. on avia.js there is that function toggle_submenu( menu, e )
    but i do not see how to close the siblings on touch.
    Maybe a mod knows better way to do it. – Sorry

    i do not have this to examine if it will work but can you try this in child-theme functions.php:

    hm – not working – looking for touchfriendly code

    All is said in detail above: now your page-id is 309

    function replace_tags_with_tags(){
    ?>
    <script>
      (function($) {       
          function replaceElementTag(targetSelector, newTagString) {
            $(targetSelector).each(function(){
              var newElem = $(newTagString, {html: $(this).html()});
              $.each(this.attributes, function() {
                newElem.attr(this.name, this.value);
              });
              $(this).replaceWith(newElem);
            });
          }
          replaceElementTag('.page-id-309 .avia-slideshow-1 .slide-1 h2.avia-caption-title', '<h1></h1>'); 
      }(jQuery)); 
    </script>
    <?php
    }
    add_action('wp_footer', 'replace_tags_with_tags');

    the only thing to do is now to give the h1 then a white color:
    see if i simulate the jQuery on developer tools.
    Film

    in reply to: SVG Datei #1123990

    ich würde dir das Plugin svg Support empfehlen wollen, weil es zusätzlich die Möglichkeit bietet eventuell die svgs nicht als img sondern als inline svg zu setzen.
    Trotzdem benötigt ein svg eine Größenangabe zB width – da es von der Media Library als 0 x 0 image geführt wird.

    in reply to: Hide Logo when scrolling down #1123989

    hm – when reading his topic i guess he will only hide the logo when scrolling – so maybe this in child-theme functions.php
    will do the job ( but without seeing your site it is hard to give advice)

    function hide_logo_on_scrolling(){
    ?>
    <script>
    (function($) {
    	$(function() {
    		    $( window ).scroll(function() {
    		    	$('.logo img').css({ 
    		    	        'opacity': '0',
    				'transition': 'all 1s ease',
    		    	});
        			clearTimeout( $.data( this, "scrollCheck" ) );
        			$.data( this, "scrollCheck", setTimeout(function() {
        				$('.logo img').css({
        				'opacity': '1',
        				'transition': 'all 1s ease',
        				});
        			}, 250) );
        		});
    	});
    })( jQuery );
    </script>
    <?php
    }
    add_action('wp_footer', 'hide_logo_on_scrolling');
    in reply to: Create 1 block – use it on all peges? #1123458

    yes if you better like to use a plugin – this is one i use for it: https://habenicht.io/product/enfold-repeatable-content/
    it is not too expensive and it is especially written for enfold.
    You will have all “repeatables” on the left side in dashboard – and you can place them by alb.

    in reply to: Create 1 block – use it on all peges? #1123185

    on “Content Elements” there is that alb : “Page Content”
    so if you create a whole page with all you need – and then you can insert that page content to different pages / posts.
    When editing that page all pages will follow that changings.

    in reply to: Ipad behaviour at Mega Menu #1123133

    I can’t see the benefit of a copy in the child’s theme.
    This was my approach, unfortunately it doesn’t work that way.

    function add_megamenu_touch_fix(){
    ?>
    <script>
    (function($){	
    	$('#avia-menu .menu-item-mega-parent .avia_mega_div a').on('touchstart', function () {
    		setTimeout(function(){ 
    
    			$(this).closest('.menu-item-mega-parent').find('>a').removeClass('open-mega-a');
    			$(this).closest('.menu-item-mega-parent').css('overflow' , 'hidden');
    			$(this).closest('.avia_mega_div').css({
    				'opacity' : '0',
    				'display': 'none',
    			});
    		}, 500);	
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_megamenu_touch_fix');

    It can’t be the first time that a touch-friendly Mega Div solution has been demanded.
    A Mega Div with Anchor submenu items is not unusual, is it? So please find a solution on that issue

    if you realy want to get rid of that button – you can use remove for it – place that in child-theme functions.php
    f.e. you placed an enfold button and give a custom class to it f.e.: button-customclass

    function remove_a_button_with_custom_class(){
    ?>
    <script>
    (function($){	
    	$(".button-customclass a").click(function(){
        	$(this).remove();
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'remove_a_button_with_custom_class');
    in reply to: Hexadecimal colors not accepted #1122724

    even if they are different – you wouldn’t realy recognize a difference.
    But what version of WordPress and Enfold do you use?
    see here : https://webers-testseite.de/color-transformation/
    i can define both values – and they are not changed !

    in reply to: Rename shortcode #1122459

    what about : [av_privacy_link]Datenschutzerklärung[/av_privacy_link]

    in reply to: Reverse column order for mobile #1122308

    well everything you did is correct.
    the direct parent element of the items gets the flex property. So you can have that on a color-section your class.
    If you just want to do reverse, everything is ok.
    So from 1,2,3 becomes 3,2,1

    However, if you want to determine the order, you can set it to the flex items

    @media only screen and (max-width:767px) {
    .column_flex_reorder .entry-content-wrapper {
        display: flex !important;
        flex-direction: column;
        flex-wrap: nowrap;
    }
      .column_flex_reorder .av_one_third:nth-child(1) {
        order:2
      }
      .column_flex_reorder .av_one_third:nth-child(2) {
        order:3
      }
      .column_flex_reorder .av_one_third:nth-child(3) {
        order:1
      }
    }

    nice Articel here: https://css-tricks.com/snippets/css/a-guide-to-flexbox/

    Test page: https://webers-testseite.de/defined-order/

    if you only have that on the given page and do not need to have that elsewhere i recommend to use: https://kriesi.at/support/topic/how-do-i-create-h1-tag-from-the-caption-title-in-fullscreen-slider-element/#post-1122106

    in reply to: change HTML Dom enfold Menu #1122302

    can not open your image in the way above.

    Can you please explain what you want to achieve with this?
    The structure in your image is the default structure of logo left menu right ! except the hamburger menu is hidden when non-responsive menu is shown.

    this is one of mine:

    in reply to: iPad drop down menu won't "tap-off" #1122284

    a little effort:

    $('#avia-menu').find('.menu-item-has-children:not(.menu-item-mega-parent).menu-item-top-level.current-menu-item .sub-menu a').on('touchend', iPadMenuFix);
    

    i placed another class to the selector so the mega-div does not hide the sublevel ul’s on touch now – but now we had to find a method to close the mega-div on touch any link in it !

    maybe a toggle of the dynamically set of open-mega-a class could help…

    in reply to: iPad drop down menu won't "tap-off" #1122223

    i tried this first to see if i could be specific only to non mega-menu issue:

    function add_touch_fix(){
    ?>
    <script>
    (function($){
    	const iPadMenuFix = function() {
            $(this).closest('ul.sub-menu').delay(1000).animate({opacity: 0,},300, function() {
                $(this).css('visibility', 'hidden');
            })
        };
    
        $('#avia-menu').find('.menu-item-has-children:not(.menu-item-mega-parent).current-menu-item a').on('touchend', iPadMenuFix);
        console.log($('#avia-menu').find('.menu-item-has-children:not(.menu-item-mega-parent).current-menu-item a'));
    
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_touch_fix');

    but it does not exclude the sub-menu hide on mega-div

    in reply to: iPad drop down menu won't "tap-off" #1122219

    this https://kriesi.at/support/topic/ipad-drop-down-menu-wont-tap-off/#post-1047074

    works but has on mega-menu wrong behavior – because it hides the closest menu which is on most cases a second-level menu under mega-menu
    see link on privage content

    in reply to: iPad drop down menu won't "tap-off" #1122215

    i have a similar problem – if the anchor-links in menu are submenu items in the dropdown.
    Ipad – on ipad i have on landscape mode often the nicer main menu to see and not the hamburger.

    i can open the dropdown menu on ipad but after scrolling to the anchor the submenu does not close.

    i tried this in functions.php:

    function add_touch_fix(){
    ?>
    <script>
    (function($){
    	$(document).ready(function(){ 	
    		$('.avia_mobile .main_menu ul .dropdown_ul_available .sub-menu li a').on('click touchend', function() {
    		  	$(this).closest('.sub-menu').css({
    			  	"opacity" : "0",
    			  	"visibility" : "hidden",
    			});
    		});
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_touch_fix');

    but it does not do the trick. Even with a timeout function it does not work – any advice?

    if you really mean that it is only for mobile devices you an use this into your child-theme functions.php:

    add_action( 'wp_head', 'landingpage_for_mobile', 10 );
    function landingpage_for_mobile() {
    if(wp_is_mobile()){
    ?>    
    <script>
      if (window.location.pathname == '/' ) {
         window.location = "/imprint/";
      }
    </script>
    <?php
    }
    }

    in this case the imprint page will be the landing page for mobile devices.

    or if you do not like to use the edited alb elements you can replace only that specific heading by this function in child-theme functions.php:

    function replace_tags_with_tags(){
    ?>
    <script>
      (function($) {       
          function replaceElementTag(targetSelector, newTagString) {
            $(targetSelector).each(function(){
              var newElem = $(newTagString, {html: $(this).html()});
              $.each(this.attributes, function() {
                newElem.attr(this.name, this.value);
              });
              $(this).replaceWith(newElem);
            });
          }
          replaceElementTag('.page-id-14 .avia-slideshow-1 .slide-1 h2.avia-caption-title', '<h1></h1>'); 
      }(jQuery)); 
    </script>
    <?php
    }
    add_action('wp_footer', 'replace_tags_with_tags');

    you see that line:

    replaceElementTag('.page-id-14 .avia-slideshow-1 .slide-1 h2.avia-caption-title', '<h1></h1>'); 
    

    you can add there as many lines as you like – if you are more specific with the selector you can be very strict in replacing
    these lines must be semicolon separated.

    F.e. – if you have there :

    replaceElementTag('.slide-1 h2.avia-caption-title', '<h1></h1>'); 
    

    every first slide in a slide-show will have a h1 tag then

    if you like to set the heading tag on each slide in a different way – you can use my edited enfold alb elements.
    But read carefully – on slider you need 4 files to substitute: https://webers-testseite.de/edited-enfold-alb-elements/

    you can put this into your child-theme functions.php:

    function my_avf_customize_heading_settings( array $args, $context, array $extra_args = array() )
    {
    	if( $context == 'avia_slideshow' )
    	{
    		$args['heading'] = 'h1';			
    		$args['extra_class'] = 'is-h1';
    	}
    	return $args;
    }
    add_filter( 'avf_customize_heading_settings', 'my_avf_customize_heading_settings', 10, 3 );

    just give that custom-class ( in my case it is : is-h1 ) to the fullscreen-slider

    every slide-show with that class will turn the default h2 to h1 tag then.

    in reply to: Change logo on specific pages #1121953

    if you are using a child-theme ( and i alway recommend that) you can replace the logo by adding something like this to your child-theme functions.php

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo){
        if( is_page(121) ) {
        	$logo = "https://bright.itsomimedia.nl/wp-content/uploads/Bright_academy_bgwit3.png"; 
        }
        return $logo;
    }

    btw: you can have more substitutions like this way with all conditional possiblities you like:

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo){
        if( is_page(121) ) {
        	$logo = "https://bright.itsomimedia.nl/wp-content/uploads/Bright_academy_bgwit3.png"; 
        }
      
        if ( is_page( array( 42, 54, 6 ) ) ) {
        	$logo = "http://www.domain.com/wp-content/uploads/logoforpage22.jpg"; 
        }
    
        if ( is_page() && !is_page(1307) )  {
        	$logo = "http://www.domain.com/wp-content/uploads/logoforpage23.jpg";  
        }
        return $logo;
    }

    etc. pp.

    in reply to: Small letters h1-h6 tag #1121489

    none No capitalization. The text renders as it is. This is default
    capitalize Transforms the first character of each word to uppercase
    uppercase Transforms all characters to uppercase
    lowercase Transforms all characters to lowercase
    initial Sets this property to its default value.
    inherit Inherits this property from its parent element.

    in reply to: Small letters h1-h6 tag #1121482

    Sorry i thought this was clear where to replace!

    #top #wrap_all .all_colors h1,
    #top #wrap_all .all_colors h2,
    #top #wrap_all .all_colors h3,
    #top #wrap_all .all_colors h4,
    #top #wrap_all .all_colors h5,
    #top #wrap_all .all_colors h6 {
    text-transform: none;
    }
    in reply to: Switching the Logo, different languages #1121479

    by the way: on wpml – this is the reason why i recommend finishing the styling of the main language and then synchronize these settings on each language version of the page.
    That could be done by import/export : Export Theme Settings File / Import Theme Settings File.

    in reply to: Small letters h1-h6 tag #1121468

    you can use :

    text-transform : none ( maybe an !important is necessary )

    in reply to: Switching the Logo, different languages #1121465

    it is possible – but the methods are different on some cases.
    If you use WPML – ( some people say it is a bug : i think it is a feature ) every language has its own enfold options page.
    So you could have different logos on those Input Fields ( you can see on top f.e.: Enfold Child (EN) Theme Options )
    different quick css etc. pp.

    If you are using alternative language plugins – there must be equivalent methods – or you can do it via that filter: avf_logo
    etc. pp. it would be nice to see the live-site link to give better advice.

    if your topmenu isn’t to big ( and i suppose that there is not enough place to have there a great menu) – wouldn’t it be easier and on performance reasons better to add those items manually to the main-menu and set those menu-items to display none on non-mobile case?

Viewing 30 posts - 6,631 through 6,660 (of 11,702 total)