Forum Replies Created

Viewing 30 posts - 1 through 30 (of 87 total)
  • Author
    Posts
  • in reply to: Adding click ID to Button elemen #1481721

    Ismael, managed to fix it. Thought I share the solution here.

    Create a custom DataLayer Variable based on the gtm.element.parentElement.className

    Check if the DataLayer Variable is filled when clicking with GTM or Developer Tools

    Create Custom Event with contains the CSS class name

    And check if the matchin works with GTM Tag Assistant

    • This reply was modified 2 weeks, 2 days ago by envis.
    in reply to: Adding click ID to Button elemen #1481709

    Ismael, thanks for your speedy reply :)

    When I add the class buttonCheckAvailability to the Full Width Button, it gets added to the div that is around the anchor, and not the anchor itself. So I don’t see it in GTM click event.

    <div class="avia-button-wrap avia-button-center  avia-builder-el-16  el_after_av_hr  el_before_av_hr  buttonCheckAvailability"><a href="/nl/boeken/" class="avia-color-theme-color avia-font-color-theme-color avia-button avia-button-fullwidth av-m95js28t-fb8d4636b31ee7e65fa48052fce1844e avia-icon_select-yes-left-icon avia-color-theme-color" aria-label="Bekijk prijzen en beschikbaarheid"><span class="avia_button_icon avia_button_icon_left avia-svg-icon avia-font-svg_entypo-fontello" data-av_svg_icon="calendar" data-av_iconset="svg_entypo-fontello"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="29" height="32" viewBox="0 0 29 32" preserveAspectRatio="xMidYMid meet" aria-labelledby="av-svg-title-5" aria-describedby="av-svg-desc-5" role="graphics-symbol">
    <title id="av-svg-title-5">Calendar</title>
    <desc id="av-svg-desc-5">Calendar</desc>
    <path d="M25.6 4.8q1.344 0 2.272 0.928t0.928 2.272v19.2q0 1.28-0.928 2.24t-2.272 0.96h-22.4q-1.28 0-2.24-0.96t-0.96-2.24v-19.2q0-1.344 0.96-2.272t2.24-0.928h1.472v3.2h5.12v-3.2h9.28v3.2h5.12v-3.2h1.408zM25.6 27.2v-12.8h-22.4v12.8h22.4zM8.32 1.6v5.44h-2.24v-5.44h2.24zM22.72 1.6v5.44h-2.24v-5.44h2.24z"></path>
    </svg></span><span class="avia_iconbox_title">Bekijk prijzen en beschikbaarheid</span><span class="avia_button_background avia-button avia-button-fullwidth avia-color-theme-color-highlight"></span></a></div>

    The GTM trigger is not triggered.

    in reply to: Adding click ID to Button elemen #1481678

    Ismael,

    Thanx, I thought about this option, but I thought it might get a bit messy with Google Tag Manager (GTM). So I am trying to match in GTM the button with the element. Tried matching #buttonCheckAvailability with contains, RegEx match and matches CSS selector. All options did not work :(

    Matching a CSS id/class in GTM

    I know this might be outide of support, but maybe you know top of mind if this can be fixed in GTM?

    in reply to: Booking System shortcode #1481152

    Ismael,

    You are awesome, thanx for that :) It works like a charm.
    I have translated the form in the WP Booking System plugin and it looks good.

    But it seems like a side effect showed up. I have a button on the same page in the bottom. But that button URL is not translateable anymore in WPML. It used to be. Can this be related to your fix?

    WPML ATE

    • This reply was modified 3 weeks, 6 days ago by envis.
    in reply to: Booking System shortcode #1481088

    Ismael,

    Thank you very much for your solution. I have added your shortcode generator in functions.php of the child-theme.

    function av_wpbs_wpml_cb() {
        $lang = apply_filters('wpml_current_language', null);
        $id = 1;
        $language = 'en';
    
        switch ($lang) {
            case 'nl':
                $id = 1;
                $language = 'nl';
                break;
            case 'en':
                $id = 1;
                $language = 'en';
                break;
            case 'fr':
                $id = 1;
                $language = 'de';
                break;
            default:
                $id = 1;
                $language = 'nl';
                break;
        }
    
        return do_shortcode('[wpbs id="' . esc_attr($id) . '" language="' . esc_attr($lang) . '" show_prices="yes" title="no" legend="yes" legend_position="side" display="1" year="0" month="0" start="1" dropdown="yes" jump="no" history="1" tooltip="1" highlighttoday="no" weeknumbers="no" show_first_available_date="no" form_id="1" form_position="bottom" auto_pending="yes" selection_type="multiple" selection_style="split" minimum_days="7" maximum_days="0" booking_start_day="6" booking_end_day="6" show_date_selection="no"]');
    	
    }
    add_shortcode('av_wpbs_wpml', 'av_wpbs_wpml_cb');

    Then added the shortcode to a text block:
    [av_wpbs_wpml]

    Test URL:
    https://villasari.de/nl/test-shortcode/

    I get this error:
    Fatal error: Uncaught TypeError: ksort(): Argument #1 ($array) must be of type array, null given in /var/www/vhosts/villasari.de/httpdocs/wp-content/plugins/multilingual-tools-2.2.6/inc/class-mltools-shortcode-attribute-filter.php:86 Stack trace: #0 /var/www/vhosts/villasari.de/httpdocs/wp-content/plugins/multilingual-tools-2.2.6/inc/class-mltools-shortcode-attribute-filter.php(86): ksort() #1 /var/www/vhosts/villasari.de/httpdocs/wp-content/plugins/multilingual-tools-2.2.6/inc/class-mltools-shortcode-attribute-filter.php(66): MLTools_Shortcode_Attribute_Filter->add_tag() #2 /var/www/vhosts/villasari.de/httpdocs/wp-includes/class-wp-hook.php(326): MLTools_Shortcode_Attribute_Filter->do_shortcode_tag_filter() #3 /var/www/vhosts/villasari.de/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters() #4 /var/www/vhosts/villasari.de/httpdocs/wp-includes/shortcodes.php(447): apply_filters() #5 [internal function]: do_shortcode_tag() #6 /var/www/vhosts/villasari.de/httpdocs/wp-includes/shortcodes.php(273): preg_replace_callback() #7 /var/www/vhosts/villasari.de/httpdocs/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/class-shortcode-helper.php(580): do_shortcode() #8 /var/www/vhosts/villasari.de/httpdocs/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/textblock/textblock.php(541): ShortcodeHelper::avia_apply_autop() #9 /var/www/vhosts/villasari.de/httpdocs/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/class-shortcode-template.php(1329): avia_sc_text->shortcode_handler() #10 /var/www/vhosts/villasari.de/httpdocs/wp-includes/shortcodes.php(434): aviaShortcodeTemplate->shortcode_handler_prepare() #11 [internal function]: do_shortcode_tag() #12 /var/www/vhosts/villasari.de/httpdocs/wp-includes/shortcodes.php(273): preg_replace_callback() #13 /var/www/vhosts/villasari.de/httpdocs/wp-includes/class-wp-hook.php(324): do_shortcode() #14 /var/www/vhosts/villasari.de/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters() #15 /var/www/vhosts/villasari.de/httpdocs/wp-content/themes/enfold/template-builder.php(102): apply_filters() #16 /var/www/vhosts/villasari.de/httpdocs/wp-includes/template-loader.php(106): include('...') #17 /var/www/vhosts/villasari.de/httpdocs/wp-blog-header.php(19): require_once('...') #18 /var/www/vhosts/villasari.de/httpdocs/index.php(17): require('...') #19 {main} thrown in /var/www/vhosts/villasari.de/httpdocs/wp-content/plugins/multilingual-tools-2.2.6/inc/class-mltools-shortcode-attribute-filter.php on line 86

    Any clue?

    in reply to: Booking System shortcode #1480994

    Ismael, Did forward the error to WPML support. No result yet. Will try adding the content of the XML file to WPML. I am not sure where I can then find the translations of the schortcode? Should they appear in the Advanced Translation Editor?

    in reply to: Booking System shortcode #1480704

    Maybe this was a human error. The wpml-config.xml was missing from the enfold theme folder. I have put it back there. Can you try again? Or does it have nothing to do with it?

    in reply to: Booking System shortcode #1480655

    Ismael,

    I asked WPML and they came up with this solution.

    So I expect that because of this XML, I would see an ID and LANGUAGE attribute that I can change with WPML per language version. But I do not.

    Greetings,
    Gerben

    • This reply was modified 1 month ago by envis.
    in reply to: Measure Enfold Contactform Submissions with GTM #1432929

    The screenshot was of Google Tag Manager (GTM). I really want to use the GTM solution for form submit measuring. Apparently the built in “Form Submission” trigger, does not fire with the Enfold Form, since there is no page reload on submit. A solution would be if I catch the response of the form submission by CSS id in GTM. 2 Problems with this:

    Thank you message code (div id) is very generic
    The code is not very unique <div id="ajaxresponse_1" class="ajaxresponse ajaxresponse_1" style="display: block;"><div id="result_ajax_response_1" class="ajaxresponse ajaxresponse_1"><h3 class="avia-form-success ">Jouw bericht is verstuurd!</h3></div></div> but I can fix this with a Page Patch criterium in GTM.

    Message stays in screen
    The “thank you message” stays in the screen, so if the user accidentily opens the /contact/ page again, the trigger is fired twice and the submits are counted twice as well. Can this be avoided?
    <img src="<img src=”https://i.ibb.co/qsc6cmm/2024-02-04-16-01-13-Clipboard.png&#8221; alt=”2024-02-04-16-01-13-Clipboard” border=”0″ />” alt=”Thank you message” />Thank you message

    • This reply was modified 1 year, 3 months ago by envis.
    • This reply was modified 1 year, 3 months ago by envis.
    • This reply was modified 1 year, 3 months ago by envis.
    • This reply was modified 1 year, 3 months ago by envis.
    in reply to: WooCommerce Brands overview page #1346934

    Nikko, that fixed it for me. As I understand correctly both documents used the same CSS Classes and this gave the logo a default color. Thanx a lot!

    in reply to: WooCommerce Brands overview page #1341975

    Nikko,

    This is new for me, are the classes stored inside the SVG-file? I just downloaded them from their respected websites.
    So I have to change them manually? or is there another solution?

    With kind regards,

    Gerben

    in reply to: WooCommerce Brands overview page #1341729

    Nikko,

    The logo of the website has the same colors as the logo of the brand. So that’s why it looks good in your screenshot, but not for the other brand. For the other brandpages the brands logo messes up color of the website logo.

    Read below in private comments.

    Best regards,

    Gerben

    in reply to: WooCommerce Brands overview page #1341554

    Nikko,

    I had to escape the ” in one line of your code:
    echo "<img src=\"{$thumb_src[0]}\" />";

    Then it works, but with 2 major downsides:

    1. Logo is extremely biga (looking into a CSS-fix)
    2. The logo changes the colors of main logo (here the black in de logo is turned into yellow of van der valk logo)

    Screenshot

    Best regards,

    Gerben

    • This reply was modified 3 years, 2 months ago by envis.
    in reply to: WooCommerce Brands overview page #1341553
    This reply has been marked as private.
    in reply to: WooCommerce Brands overview page #1341313

    Nikko,

    The code puts the SVG on the page with size 1 by 1 px.
    <img src="https://www.qsolarpanels.nl/wp-content/uploads/2022/01/Huawei_logo.svg" width="1" height="1">

    So I added some code to make them show:

    /* SVG brands overview */
    div#our-brands-logo {
        margin-bottom: 20px;
    }
    
    div.our-brands-logo img[src$=".svg"] {
        height: 120px !important;
    	width: auto !important;
    }

    The problem is now that the normal categorie show a large thumb above it. How can I show logo, but hide that thumb?

    in reply to: WooCommerce Brands overview page #1340987

    Nikko, I am pretty sure it has something to do with a SVG filetype. So I tried to do something like this: detect the filetype, then return the content of the SVG as source in the page or if PNG/JPG just use normal <img src.
    I don’t have the skills to do this right, but maybe you can make it work :)

    /**
     * Adds logo to brand page
     */
    
    add_action( 'woocommerce_before_shop_loop', 'add_brand_woocommerce_before_shop_loop', 5 );
    function add_brand_woocommerce_before_shop_loop() {
    	global $wp_query;
    	$brand_id = $wp_query->get_queried_object()->term_id;
    	$thumbnail_id = WC_Brands::get_term_meta( $brand_id, 'thumbnail_id', true );
    
            $file_info = pathinfo( wp_get_attachment_url( $thumbnail_id ) );
    
    	if ( $thumbnail_id ) {
    	        if ( $file_info['extension'] === 'svg' ) {
    		        echo file_get_contents( wp_get_attachment_url( $thumbnail_id ) );
                    } else {
    		        $thumb_src = wp_get_attachment_image_src( $thumbnail_id, $size );
    		        echo "<img src="{$thumb_src[0]}" width="{$thumb_src[1]}" height="{$thumb_src[2]}" />";
                    }
    	}
    }
    • This reply was modified 3 years, 2 months ago by envis.
    in reply to: WooCommerce Brands overview page #1340899

    Nikko,

    Notice: Undefined variable: size in functions.php on line 66

    Line 66:
    $thumb_src = wp_get_attachment_image_src( $thumbnail_id, $size );

    Does this have to do with SVG image support?

    • This reply was modified 3 years, 2 months ago by envis.
    in reply to: WooCommerce Brands overview page #1340804

    Nikko, if a product bundle consists of mutiple brands and is included in the brands page, then there will be 2 logo’s above the page.
    Is this something that can be fixed?

    Screenshot of brands page which features product bundles with mutiple brands

    in reply to: WooCommerce Brands overview page #1340593

    Nikko,

    Thank you for your proposed solution. This displays 2 logos on the page and they are below the description of the brand. Can you tell me how I can adjust the code to display the logo above the content?

    Screenshot of the brand page

    in reply to: WooCommerce Brands overview page #1340057

    Nikko,

    I can not filter a dynamic IP. So I have no means of revealing to you this page. But the brands overview page does not show a logo.
    I have created a login for you as a reader so you can view the page. Check private data please.

    With kind regards,

    Gerben

    in reply to: Double title in blog #800523

    Victoria,

    I fixed it. Somehow I hadn’t setup the NEWS page in the Enfold settings.
    Doh!

    Thanks for your help.

    in reply to: Double title in blog #800520

    Victoria,

    I do not understand. The newsarticle http://www.lions-heerenveen.nl/uber-die-grenze/ can not have a working breadcrumb like “home / news / uber die grenze”?

    in reply to: Testimonials not showing #799629

    Nikko,

    That fixed it. I know that putting a space in an anchor is a bad idee (and I didn’t do it), but that shouldn’t cause a site to malfunction like that right?

    Thank you very much :)
    Everything works again!

    in reply to: Testimonials not showing #797301

    I have tried everything by now:

    • Enfold and WP are up-to-date. Even updated enfold folder manually from latest zip
    • Tried removing content of style.css in CSS style sheet, no effect
    • Tried with empty functions.php, no effect

    When I copy all content of the page (CTRL+A CTRL+V in Notepad, I see the text of the testimonials.
    Can you have one more look, this is driving me insane!

    in reply to: Testimonials not showing #773056

    Yigit,

    Removed the entire Enfold theme and replaced it with version 4.05.
    The problem persists.

    I do use a bit of custom code to keep the gallery in view when paginating.
    You guys helped me with this:

    add_action( ‘wp_footer’, ‘enfold_customization_pagination_anchor’ );
    function enfold_customization_pagination_anchor() {
    ?>
    <script type = “text/javascript”>
    jQuery(document).ready(function(){
    jQuery(‘.pagination a’).each(function(i, e){
    var url = jQuery(this).attr(‘href’);
    jQuery(this).attr(‘href’, url + “#portfolio”);
    });
    });
    </script>
    <?php
    }

    Can this somehow influence the Tesitmonial rotator?

    • This reply was modified 8 years, 1 month ago by envis.
    in reply to: Testimonials not showing #767026

    Login information attached in private content

    in reply to: Testimonials not showing #766380

    I deactivated all plugins and still nothing :S
    Any clue?

    in reply to: Facebook pixel and CompleteRegistration javascript #707099

    I fixed it. It was a caching problem :(
    But also the second code needed <script> tags in order to work.

    function facebook_completeregistration(){
            if ( is_page( 291 )) {
    	?>
    	<!-- Facebook Pixel Code CompleteRegistration -->
    	<script>
    	fbq('track', 'CompleteRegistration');
    	</script>
    	<!-- End Facebook Pixel Code CompleteRegistration -->
    	<?php
            }
    }
    add_action('wp_head', 'facebook_completeregistration');

    Maybe this is still useful for other Enfold-users who want to track conversions by adding code to functions.php :)

    in reply to: Icon size in button #703702

    Thank you Ismael,

    That is making the icon + text bigger.
    But I would like to make the icon bigger than the text and keep them both vertically centered.

    Do you know any solution for this?

    in reply to: Icon size in button #702815

    Rikard,

    URL attached in Private Content

    I have created the following CSS to make the icon bigger.

    span.avia_button_icon.avia_button_icon_left {
    	font-size: 36px;
    }

    But as you can see, the vertical allignment is completely wrong.

Viewing 30 posts - 1 through 30 (of 87 total)