Viewing 30 results - 61 through 90 (of 1,633 total)
  • Author
    Search Results
  • #1474397

    In reply to: SKU field

    Hi Ismael ,

    I followed the step of added custom product fields https://woocommerce.com/document/custom-product-fields/ and display it with https://developer.woocommerce.com/docs/displaying-custom-fields-in-your-theme-or-site/?_gl=1*1hrrkjn*_ga*NjI0MTU1ODk1LjE3MzU1NTE0OTg.*_ga_98K30SHWB2*MTczNTU1MTQ5Ny4xLjEuMTczNTU1MTUyMC4wLjAuMA..

    Nothing appear on my web page ?

    I used this product to make a test

    Could you check it please ?

    #1474389

    In reply to: SKU field

    Hi,

    Thank you for the info.

    Would you mind providing a link to the plugin page? You may need to contact the plugin author for additional assistance on displaying the EAN info on the frontend. For more details on adding custom fields to products, please refer to this documentation: https://woocommerce.com/document/custom-product-fields/

    Best regards,
    Ismael

    Hi,

    Thank you for the update.

    We updated the filter to include the post meta “header_transparency” with the value “header_transparent header_hidden”.

    function ava_update_custom_fields_for_post_type() {
        $post_type = 'your_post_type';
    
        $posts = get_posts(array(
            'post_type'      => $post_type,
            'posts_per_page' => -1,
            'post_status'    => 'any',
            'fields'         => 'ids',
        ));
    
        if (!empty($posts)) {
            foreach ($posts as $post_id) {
                update_post_meta($post_id, '_aviaLayoutBuilder_active', 'active');
                update_post_meta($post_id, '_aviaLayoutBuilderCleanData', '[av_custom_layout link=\'alb_custom_layout,653\' av_uid=\'av-m3u7m8lu\' sc_version=\'1.0\']');
                update_post_meta($post_id, '_avia_builder_shortcode_tree', 'a:1:{i:0;a:3:{s:3:"tag";s:16:"av_custom_layout";s:7:"content";a:0:{}s:5:"index";i:0;}}');
                update_post_meta($post_id, '_avia_sc_parser_state', 'disabled');
                update_post_meta($post_id, '_av_alb_posts_elements_state', 'a:1:{s:16:"av_custom_layout";b:1;}');
                update_post_meta($post_id, '_av_el_mgr_version', '1.0');
                update_post_meta($post_id, 'header_transparency', 'header_transparent header_hidden');
            }
        }
    }
    
    add_action('init', 'ava_update_custom_fields_for_post_type');
    

    Please make sure to create a backup of your site before proceeding.

    Best regards,
    Ismael

    #1473781

    or try instead:

    #top.home #av-layout-grid-1 fieldset {
      display: flex;
      flex-flow: row wrap;
      justify-content: center;
      gap: 5px;
    }
    
    #top.home #av-layout-grid-1 fieldset p {
      width: unset;
    }
    
    #top.home #av-layout-grid-1 fieldset p:first-of-type {
      width: 50%
    }
    
    #top.home #av-layout-grid-1 fieldset p:first-of-type input {
      border: 1px solid #be363c;
      border-radius: 26px 0 0 26px
    }
    
    #top.home #av-layout-grid-1 fieldset p .button {
      border-radius: 0 26px 26px 0;
    }

    and maybe you style that black box a bit too : change background-color and add some css :

    .custom-black-box {
      background-color: rgba(0,0,0,0.3);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
    }
    #1473746

    Hey Ismael

    Excellent thanks and I’ve combined the two functions for simplicity and posting here if anyone else wants a function that adds custom fields to grid posts (ALB) and single posts (Non-ALB).

    // Helper function to generate the custom event details HTML
    function generate_custom_event_details($post_id) {
        $event_date = get_post_meta($post_id, 'event_date', true);
        $event_time = get_post_meta($post_id, 'event_time', true);
        $event_location = get_post_meta($post_id, 'event_location', true);
    
        $custom_output = '<div class="custom-event-details">';
        if ($event_date) {
            $custom_output .= '<p class="event-date"><strong>Event Date:</strong> ' . esc_html($event_date) . '</p>';
        }
        if ($event_time) {
            $custom_output .= '<p class="event-time"><strong>Event Time:</strong> ' . esc_html($event_time) . '</p>';
        }
        if ($event_location) {
            $custom_output .= '<p class="event-location"><strong>Event Location:</strong> ' . esc_html($event_location) . '</p>';
        }
        $custom_output .= '</div>';
    
        return $custom_output;
    }
    
    // Filter for avf_post_slider_entry_excerpt
    add_filter('avf_post_slider_entry_excerpt', function ($excerpt, $prepare_excerpt, $permalink, $entry, $context) {
        $custom_output = generate_custom_event_details($entry->ID);
    
        // Check if the "Read More" link exists in the excerpt
        $read_more_position = strpos($excerpt, '<a');
        if ($read_more_position !== false) {
            // Insert the custom output before the "Read More" link
            $before_read_more = substr($excerpt, 0, $read_more_position);
            $read_more_and_after = substr($excerpt, $read_more_position);
            return $before_read_more . $custom_output . $read_more_and_after;
        }
    
        // Append custom output if no "Read More" link is found
        return $excerpt . $custom_output;
    }, 10, 5);
    
    // Filter for the_content
    add_filter('the_content', function ($content) {
        if (is_singular('post')) {
            $custom_output = generate_custom_event_details(get_the_ID());
            $content .= $custom_output;
        }
    
        return $content;
    }, 10);
    #1473566
    raslade
    Participant

    Hi there

    I’ve opened a new thread based on my last https://kriesi.at/support/topic/secure-custom-field-after-excerpt/#post-1473534 as I’ve just remembered I need the function to also add the custom fields to the single posts. Is it a quick fix?

    Thanks
    Richard

    #1473545
    rvga
    Participant

    Hi guys,
    I fight trying to set up a phone number link to an ALB animated number with no success.
    Can’t find the right syntax to set either in the “manual link setting” or in the underneath “custom field link” of the Advanced Tab fields.
    Anyone to give me a help on that one please ?
    P.S
    I’ve set the domain and its certificate just yesterday, maybe propagation is not over yet, but the link is a safe one.

    • This topic was modified 1 year, 2 months ago by rvga. Reason: Giving more details
    #1473479

    Hey Ismael, that’s great thanks it worked. Although the fields appeared after the Read More button so I have adjusted the code. Not sure if it’s the most tidy way of doing it though.

    add_filter('avf_post_slider_entry_excerpt', function ($excerpt, $prepare_excerpt, $permalink, $entry, $context) {
        $event_date = get_post_meta($entry->ID, 'event_date', true);
        $event_time = get_post_meta($entry->ID, 'event_time', true);
        $event_location = get_post_meta($entry->ID, 'event_location', true);
    
        // Prepare custom output
        $custom_output = '<div class="custom-event-details">';
        if ($event_date) {
            $custom_output .= '<p class="event-date"><strong>Event Date:</strong> ' . esc_html($event_date) . '</p>';
        }
        if ($event_time) {
            $custom_output .= '<p class="event-time"><strong>Event Time:</strong> ' . esc_html($event_time) . '</p>';
        }
        if ($event_location) {
            $custom_output .= '<p class="event-location"><strong>Event Location:</strong> ' . esc_html($event_location) . '</p>';
        }
        $custom_output .= '</div>';
    
        // Check if the "Read More" link exists in the excerpt
        $read_more_position = strpos($excerpt, '<a');
        if ($read_more_position !== false) {
            // Insert the custom output before the "Read More" link
            $before_read_more = substr($excerpt, 0, $read_more_position);
            $read_more_and_after = substr($excerpt, $read_more_position);
            return $before_read_more . $custom_output . $read_more_and_after;
        }
    
        // Append custom output if no "Read More" link is found
        return $excerpt . $custom_output;
    }, 10, 5);
    #1473254
    raslade
    Participant

    Hi there

    I’ve been trying to add custom fields so that they show below the excerpt on both the blog grid and single posts using the following code. I’ve added it to the child theme function but I can’t get it to work. Any pointers would be great, thanks.

    add_filter('the_excerpt', function ($excerpt) {
        // Check if we're in a post and want custom fields added
        if (is_single() || is_home() || is_archive()) { 
            // Fetch custom fields
            $event_date = get_post_meta(get_the_ID(), 'event_date', true);
            $event_time = get_post_meta(get_the_ID(), 'event_time', true);
            $event_location = get_post_meta(get_the_ID(), 'event_location', true);
    
            // Create custom field output with individual classes
            $custom_output = '<div class="custom-event-details">';
            if ($event_date) {
                $custom_output .= '<p class="event-date"><strong>Event Date:</strong> ' . esc_html($event_date) . '</p>';
            }
            if ($event_time) {
                $custom_output .= '<p class="event-time"><strong>Event Time:</strong> ' . esc_html($event_time) . '</p>';
            }
            if ($event_location) {
                $custom_output .= '<p class="event-location"><strong>Event Location:</strong> ' . esc_html($event_location) . '</p>';
            }
            $custom_output .= '</div>';
    
            // Append custom fields to the excerpt
            return $excerpt . $custom_output;
        }
    
        // Return the original excerpt for other types of content
        return $excerpt;
    });
    #1473251

    Hi Ismael,
    The case I’m dealing with is fairly straightforward and is likely to recur quite often among Enfold users.

    Typical example:

    1. I’m using a Custom Layout to display a company directory via a dedicated CPT.
    2. For each company listing I can fill in 2 custom fields for their links to the company’s social networks (let’s say LinkedIn and Facebook, to keep it classic).
    3. How do I handle the display of data depending on whether or not companies have links to provide for each of the three custom fields?

    If you have any recommendations on how to handle this situation, I’d love to hear from you.

    For the moment, I’ve created duplicates of my Custom Layout to correspond to the 4 possible scenarios (no link, only link 1, only link 2 or both links). With only a hundred or so entries, I was able to manually set the appropriate Custom Layout, but this would be very complicated for several thousand entries. I’ll need a conditional display solution.

    Best regards,n

    Hey henningtillmann,

    Thank you for the inquiry.

    You can try this hook in the functions.php file, but make sure to create a site backup or restore point before doing so:

    function ava_update_custom_fields_for_post_type() {
        $post_type = 'your_post_type';
    
        $posts = get_posts(array(
            'post_type' => $post_type,
            'posts_per_page' => -1,
            'post_status' => 'any',
            'fields' => 'ids',
        ));
    
        if (!empty($posts)) {
            foreach ($posts as $post_id) {
                update_post_meta($post_id, '_aviaLayoutBuilder_active', 'active');
                update_post_meta($post_id, '_aviaLayoutBuilderCleanData', '[av_custom_layout link=\'alb_custom_layout,653\' av_uid=\'av-m3u7m8lu\' sc_version=\'1.0\']');
                update_post_meta($post_id, '_avia_builder_shortcode_tree', 'a:1:{i:0;a:3:{s:3:"tag";s:16:"av_custom_layout";s:7:"content";a:0:{}s:5:"index";i:0;}}');
                update_post_meta($post_id, '_avia_sc_parser_state', 'disabled');
                update_post_meta($post_id, '_av_alb_posts_elements_state', 'a:1:{s:16:"av_custom_layout";b:1;}');
                update_post_meta($post_id, '_av_el_mgr_version', '1.0');
            }
        }
    }
    
    add_action('init', 'ava_update_custom_fields_for_post_type');
    

    Just refresh the dashboard once, then remove the hook immediately. This will create the necessary custom fields for each item in the custom post type and enable the ALB automatically. Make sure to update the value 653 with the actual ID of the custom layout:

    update_post_meta($post_id, '_aviaLayoutBuilderCleanData', '[av_custom_layout link=\'alb_custom_layout,653\' av_uid=\'av-m3u7m8lu\' sc_version=\'1.0\']');
    

    And place the name or slug of the post type here:

    $post_type = 'your_post_type';
    

    Best regards,
    Ismael

    henningtillmann
    Participant

    Hi there,

    I am using Secure Custom Fields and I have set up a template using the ALB.
    Now I need to import lots of posts using “WP All Import”.

    Everything works great, except that I have to manually open each imported post, click “Advanced Layout Editor” and select the custom layout. I have tried to use a shortcode in post content during import, which does not work.

    1. Can I automatically set the custom layout to all imported posts? In general I find it a bit cumbersome to always use the ALB on each custom post to select the template (and nothing else).

    alternatively:
    2. Is there a way to ignore the post content and always set the template to a specific template for all posts belonging to a certain custom post type?

    Thank you in advance!

    Best,
    Henning

    #1473027
    agencelarsen
    Participant

    Hello everyone,
    I’m really happy with this “Custom Layout” feature that I use with ACF to make CPTs. :-)

    I have over a hundred entries (from the same CPT) that use the same Custom Layout except that one of the ACF custom fields is sometimes empty (and filled in most of the time).

    As this is a link that I’m displaying in a button, I’d like to be able to display the button only when the field is filled in, otherwise it creates a bad user experience.

    I couldn’t find in the documentation for Custom Layouts with ACF how to make the display conditional (when the field isn’t empty). Is there any way of doing this?

    Best regards

    Hi Ismael,
    I confirm that the fields have the same values for all the CPTs using the same Custom Layout. For more details here are the found values for each custom fields provided :

    • _aviaLayoutBuilder_active : active
    • _aviaLayoutBuilderCleanData : [av_custom_layout link=\'alb_custom_layout,653\' av_uid=\'av-m3u7m8lu\' sc_version=\'1.0\']
    • _avia_builder_shortcode_tree : a:1:{i:0;a:3:{s:3:\”tag\”;s:16:\”av_custom_layout\”;s:7:\”content\”;a:0:{}s:5:\”index\”;i:0;}}
    • _alb_shortcode_status_content : 0 occurence of this meta_key found
    • _alb_shortcode_status_clean_data : 0 occurence of this meta_key found
    • _alb_shortcode_status_preview : 0 occurence of this meta_key found
    • _avia_sc_parser_state : disabled
    • _av_alb_posts_elements_state : a:1:{s:16:\”av_custom_layout\”;b:1;}
    • _av_el_mgr_version : 1.0

    I’m now able to mass import all entries in a row ! this is marvellous ! Thank you Ismael ! You can mark this thread as solved.

    I have a secondary question about my mass data import project but I’m opening another thread about this.

    Thanks !!!

    Hello Ismael,
    If I understand correctly your explanations concerning these custom fields, I should have the same values on all my CPTs since the very same Custom Layout template is used.

    I’ll compare a few posts in my database to confirm this hypothesis and, if that’s the case, I’ll be able to leverage the power of Enfold and its new features like never before.

    I plan to do this tomorrow, and I’ll post my findings in this conversation to help anyone else who might be interested.

    Best regards,

    #1472830
    williamslyd
    Participant

    Hi there, we are using the Yoast SEO plugin to craft custom meta descriptions for blog posts. We are also using the excerpt field to write custom excerpts that display on page. Doing so has resulted in us getting warnings (in ahrefs.com) that our posts have two meta descriptions. How can I continue to use the excerpt and SEO meta description fields and to display the excerpt in the blog post widget but remove the meta description tag so that Google doesn’t see two meta descriptions?

    #1472765

    Hi,

    This text pops up when filling in the fields.

    Suspicious activity has been detected. If you believe this to be an error, please contact  (Email address hidden if logged out) .
    

    Please disable it temporarily.

    We adjusted the script a bit and added the updated_checkout event. Please try it again:

    function av_custom_script_tax_exempt() { ?>
      <script>
        window.addEventListener('DOMContentLoaded', function() {
          (function($) {
            $(function() {
              function updateTaxLabel() {
                $('.cart_totals .tax-total th, #order_review .tax-total th').each(function() {
                  var text = $(this).text();
                  if (text.includes('Tax')) {
                    $(this).html(text.replace('Tax', 'Tax (<a href="https://example.com/tax-exempt-info" target="_blank">Tax Exempt?</a>)'));
                  }
                });
              }
    
              setTimeout(updateTaxLabel, 2000);
    
              $(document.body).on('updated_checkout', function() {
                updateTaxLabel();
              });
            });
          })(jQuery);
        });
      </script>
    <?php
    }
    add_action('wp_footer', 'av_custom_script_tax_exempt', 99);
    

    Best regards,
    Ismael

    Thank you Ismael for your answer.
    I’ll analyse the values of these fields and try to determine how to set them programmatically.

    The meta fields I’m the less sure about are the following (the values displayed below are from a CPT where I activated ALB manually) :

    • _avia_builder_shortcode_tree : a:1:{i:0;a:3:{s:3:”tag”;s:16:”av_custom_layout”;s:7:”content”;a:0:{}s:5:”index”;i:0;}}
    • _av_alb_posts_elements_state : a:1:{s:16:”av_custom_layout”;b:1;}

      Do you know if there is any Enfold documentation about the way their values are generated ?

      Best regards,

    • This reply was modified 1 year, 3 months ago by agencelarsen.

    Thank you Ismael for your answer.

    Do you have some information about the expected values of each of these meta fields ?

    As each entry will use the same CPT and “Custom Layout”, I guess that I can anticipate the values even if some “post ID” or other parameters are included.

    It seems to me that being able to quickly mass publish CPTs (using ALB) is a fine demonstration of the power of Enfold and its great “Custom Layout” functionality!

    Best regards,

    Hello Ismael,
    thank you for your quick answer !
    Unfortunately I can’t use the import/export tools for this CPT because it’s an Excel database of hundreds of entries from my customer that I need to transform into this freshly created CPT.

    So I’ve prepared my Custom Layout for this CPT (as well as all my custom fields, with ACF) and I’d like to be able to import the data and programmatically activate the Advanced Layout Editor.

    Using only the custom field _aviaLayoutBuilder_active with the “active” value, the Advanced Layout Editor is well activated but not rendered in frontend. I have to open the edition page of each CPT manually and then click “Update” in order to generate the proper avia custom fields.

    It’s quite frustrating to see that all my CPTs are ready, with the right content, but that because of this small detail there’s still a manual operation to perform on hundreds of posts.

    Best regards,

    agencelarsen
    Participant

    Hi everyone,
    I’m testing the Dynamic Content new feature along with the Custom Layout and it works like a charm with ACF custom post types. Great job !

    After adding a few posts (using the custom fields defined for my CPT) manually, I tried importing the 200 posts I have into a CSV file using the plugin “Ultimate CSV Importer Free” (I’m not advertising, it’s just one of many but it’s free and works with CSV instead of WordPress native XML import/export files).

    I then noticed that my CPTs were displayed by default in the form of a blog post with the shortcodes of my Custom Layout content displayed in plain text.

    Then I saw that there was a field in the database called _aviaLayoutBuilder_active that had an active value, but it doesn’t seem to be enough to activate ALB on the post.

    Can you tell me what other custom fields are used to properly activate the Advanced Layout Editor on a post, and what values to give them?
    I can see that activating the Advanced Layout Editor then updating the post generates a lot of additional fields in the _postmeta table :

    • _aviaLayoutBuilder_active : active
    • _edit_lock : 1732749476:1
    • _edit_last : 1
    • _avia_sc_parser_state : disabled
    • _av_css_styles : a:0:{}
    • _custom_layout_post_id :
    • _aviaLayoutBuilderCleanData : [av_custom_layout link='alb_custom_layout,653' av_uid='av-m3u7m8lu' sc_version='1.0']
    • _avia_builder_shortcode_tree : a:1:{i:0;a:3:{s:3:”tag”;s:16:”av_custom_layout”;s:7:”content”;a:0:{}s:5:”index”;i:0;}}
    • _av_el_mgr_version : 1.0
    • _av_alb_posts_elements_state : a:1:{s:16:”av_custom_layout”;b:1;}
    #1472303

    Topic: Slow speed website

    in forum Enfold

    Hello,
    I’m trying to resolve the speed problem on my website using the query monitor plugin
    I’ve found that there are two main reasons:
    – aviaDynamicContent->get_default_custom_fields()
    – layerslider_delete_caches()
    Is it possible to speed up the query linked to these functions somehow? or disable them? I do not use layerslider.

    Wegen etwas höherer Browser Kompatibilität (so war es jedenfalls mal bei Safari und clamp) nutze ich für fluide font-size Definitionen die min/max Methode.
    Siehe Link in Enfold Typography Sektion: https://spencermortensen.com/articles/typographic-scale/ wählte ich die musikalische Skala – und zwar einmal mit Faktor 2 und dann 3 ergeben sich folgende font-size Größen:
    40-60, 36-50, 32-42, 28-34, 25-29, 22-24
    was zu folgenden fluid Werten führt (ausgehend von einem viewport von 320px bis 1500px (Fluid-Font Calculator)
    ____
    Due to slightly higher browser compatibility, I use the min/max method for fluid font-size definitions.
    See link in Enfold Typography section: https://spencermortensen.com/articles/typographic-scale/ I chose the musical scale – once with factor 2 and then 3 the following font-size sizes result:
    40-60, 36-50, 32-42, 28-34, 25-29, 22-24
    which leads to the following fluid values (based on a viewport of 320px to 1500px (Fluid-Font Calculator)

    da Enfold selbst mit CSS Variablen arbeitet:
    as Enfold itself works with CSS variables:

    :root {
      --enfold-font-size-theme-content: 13px;
      --enfold-font-size-theme-h1: 34px;
      --enfold-font-size-theme-h2: 28px;
      --enfold-font-size-theme-h3: 20px;
      --enfold-font-size-theme-h4: 18px;
      --enfold-font-size-theme-h5: 16px;
      --enfold-font-size-theme-h6: 14px;
    }

    könnte man die mittels Filter überschreiben:
    you could overwrite them using a filter:

    function my_avf_dynamic_css_after_vars( $output = '' ){
      $output .= "\n";
      $output .= ":root {\n";
      $output .=    "--enfold-font-size-theme-h1: min(max(40px, calc(2.5rem + (60 - 40) * ((100vw - 320px) / (1500 - 320)))), 60px);\n";
      $output .=    "--enfold-font-size-theme-h2: min(max(36px, calc(2.25rem + (50 - 36) * ((100vw - 320px) / (1500 - 320)))), 50px);\n";
      $output .=    "--enfold-font-size-theme-h3: min(max(32px, calc(2rem + (42 - 32) * ((100vw - 320px) / (1500 - 320)))), 42px);\n";
      $output .=    "--enfold-font-size-theme-h4: min(max(28px, calc(1.75rem + (34 - 28) * ((100vw - 320px) / (1500 - 320)))), 34px);\n";
      $output .=    "--enfold-font-size-theme-h5: min(max(25px, calc(1.5625rem + (29 - 25) * ((100vw - 320px) / (1500 - 320)))), 29px);\n";
      $output .=    "--enfold-font-size-theme-h6: min(max(22px, calc(1.375rem + (24 - 22) * ((100vw - 320px) / (1500 - 320)))), 24px);\n";
      $output .=    "--enfold-font-size-theme-content: min(max(16px, calc(1rem + (20 - 16) * ((100vw - 320px) / (1500 - 320)))), 20px);\n";  // p-tags  
      $output .= "}\n";
    
      return $output;
    }
    add_filter( 'avf_dynamic_css_after_vars', 'my_avf_dynamic_css_after_vars', 10, 1 );

    ich behielt mal die long-hand Version der min-max schreibweise – so wird deutlich wie die font-sizes berechnet werden.
    I kept the long-hand version of the min-max notation – this makes it clear how the font sizes are calculated.

    um es dann global durchzusetzen dies in die quick css:
    to then globally enforce this here in the quick css:

    
    body {font-size: var(--enfold-font-size-theme-content);}
    #top h1 {font-size: var(--enfold-font-size-theme-h1);  }
    #top h2 {font-size: var(--enfold-font-size-theme-h2); }
    #top h3 {font-size: var(--enfold-font-size-theme-h3);  }
    #top h4 {font-size: var(--enfold-font-size-theme-h4); }
    #top h5 {font-size: var(--enfold-font-size-theme-h5);  }
    #top h6 {font-size: var(--enfold-font-size-theme-h6);  }
    

    btw: on Layout Builder – Typography Input Fields – you can activate that switch to have:
    “Activate to replace predefined selectboxes with font sizes with text fields to use custom units. Only recommended for experienced users who know, what they are doing. This is in active beta (since 5.0.1).”
    – you then can insert those fluid values to that input field. e.g. for extremly big h1 headings (80-120px) etc.

    #1471851
    clicksports
    Participant

    Hello,

    since the European Accessibility Act ist basically right around the corner, we are preparing a lot of our customer sites running Enfold to meet the new standards these days. One of our checking software found some issues with the default contact form that comes with the Enfold theme.

    The reported issues are as follows:

    Guideline: WCAG2AA.Principle4.Guideline4_1.4_1_2.H91.Fieldset.Name
    Message: This fieldset element does not have a name available to an accessibility API. Valid names are: legend element, aria-label undefined, aria-labelledby undefined.
    Code (abbreviated): <fieldset><p class=” first_form form_ele…</fieldset>

    Guideline: WCAG2AA.Principle4.Guideline4_1.4_1_2.H91.InputText.Name
    Message: This textinput element does not have a name available to an accessibility API. Valid names are: label element, title undefined, aria-label undefined, aria-labelledby undefined.
    Code: <input type=”text” name=”avia_6_1″ class=”hidden ” id=”avia_6_1″ value=””>

    Guideline: WCAG2AA.Principle1.Guideline1_3.1_3_1.H71.NoLegend
    Message: Fieldset does not contain a legend element. All fieldsets should contain a legend element that describes a description of the field group.
    Code: (abbreviated): <fieldset><p class=” first_form form_ele…</fieldset>

    Maybe you guys can have a look at the reported issues and check if you can release an update with the coming versions.

    Thank you!

    #1471720

    Following on from this

    I can 100% confirm this was the cause of our server issues.

    Essentially ALL Enfold websites with WooCommerce installed will gradually use up the ram and see mysql memory usage rise until the server crashes.

    The bots getting stuck crawling all of the ?avia_extended_shop_select=yes queries includes:
    Even with the rel-nofollow:
    Bing bot
    Google bot
    A majority of major search engines
    AI crawlers – New aggressive bots that ignore all instructions

    See screenshot of the before and after. Our Ram use fell from almost 90GB of ram used to 8GB used on average.
    Physical Ram usage screenshot
    https://www.dropbox.com/scl/fi/tw8p399gfdr9cclorc5j9/ramuse-screenshot.PNG?rlkey=d9ty4xvui4w3m2ycb9b9ez94s&st=28aameqn&dl=0
    Mysql memory usage screenshot
    https://www.dropbox.com/scl/fi/iixhdd5vpe7253tbavbxf/mysql-memory-usage.PNG?rlkey=15061shf0haiu3d36cdy0be3t&st=ep9fncx5&dl=0

    SOLUTION
    I propose that Enfold removes the custom sort by options and reinstates the default Woocommerce ones.
    The defaults use form fields and JS so there are no a href links in the default woo sort by dropdown. Bots cannot follow these links because there are no urls in the HTML.

    In your child theme functions.php add the following to remove the enfold filters and reinstate the woo ones.

    // remove the enfold sort by filters
    function avia_woocommerce_frontend_search_params()
    {
       return;
    }
    // reinstate the woo default sort by filters
    add_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 20 );

    Add the following CSS to quick CSS and tweak depending on your sidebar position:

    .sort-param-count {
    display:none;
    }
    .product-sorting {
    padding-top:0px;
    }
    div .product-sorting ul, div .product-sorting li {
    font-size: 16px;
    }
    div .product-sorting ul {
    width: 200px;
    }
    .main_color .sort-param a {
        color: #000000;
    }
    .sort-param-sort a, ul.sort-param-order {
    border: 1px;
    border-color: #969696;
    border-style: solid;
    }
    @media only screen and (max-width: 767px) {
        .responsive #top .woocommerce-ordering {
            position: relative;
            float: left;
            clear: both;
            margin: 0;
            padding-bottom: 25px;
            padding-top: 15px;
            top: 0px;
        }
    }
    @media only screen and (min-width: 768px) {
        .responsive #top .woocommerce-ordering {
            position: relative;
            float: left;
            clear: both;
            margin: 0;
            padding-bottom: 25px;
            padding-top: 15px;
            top: 0px;
        }
    }
    #top.woocommerce-page .woocommerce-ordering select {
    width: 100%;
    font-size:16px;
    }

    Install the Redirection Plugin:

    Add the following RegEX expression to redirect the queries so that the URL redirects BEFORE the query runs on the DB

    Source URL: ^/(.*?)/\?avia_extended_shop_select=.*
    Enable: Ignore Case, Regex and Ignore Slash
    Target URL: /$1/
    Hit Save
    This will redirect any attempt to crawl the enfold filters back to the current category

    Assuming you refer to functions.php – then our site would not work! we have code in functions.php to enable the learning management system learndash to operate and to avoid conflicts between woocommerce shop and ENFOLD. We have not made any changess in this for some time. The problem of false SQL detection and helper-assets is very recent

    This is the code in the functions.php – do you see anything that may cause problems?:
    <?php

    /*
    * Add your own functions here. You can also copy some of the theme functions into this file.
    * WordPress will use those functions instead of the original functions then.
    */

    /*
    * Remove fields from woocommerce checkout page
    * /
    /**
    Remove all possible fields by removing the commented out areas
    **/
    function wc_remove_checkout_fields( $fields ) {

    // Billing fields
    //
    /*
    unset( $fields[‘billing’][‘billing_company’] );
    unset( $fields[‘billing’][‘billing_email’] );
    unset( $fields[‘billing’][‘billing_phone’] );
    unset( $fields[‘billing’][‘billing_state’] );
    unset( $fields[‘billing’][‘billing_first_name’] );
    unset( $fields[‘billing’][‘billing_last_name’] );
    unset( $fields[‘billing’][‘billing_address_1’] );
    unset( $fields[‘billing’][‘billing_address_2’] );
    unset( $fields[‘billing’][‘billing_city’] );
    unset( $fields[‘billing’][‘billing_postcode’] );
    */

    // Shipping fields
    /*
    unset( $fields[‘shipping’][‘shipping_company’] );
    unset( $fields[‘shipping’][‘shipping_phone’] );
    unset( $fields[‘shipping’][‘shipping_state’] );
    unset( $fields[‘shipping’][‘shipping_first_name’] );
    unset( $fields[‘shipping’][‘shipping_last_name’] );
    unset( $fields[‘shipping’][‘shipping_address_1’] );
    unset( $fields[‘shipping’][‘shipping_address_2’] );
    unset( $fields[‘shipping’][‘shipping_city’] );
    unset( $fields[‘shipping’][‘shipping_postcode’] );
    */
    // Order fields
    unset( $fields[‘order’][‘order_comments’] );

    return $fields;
    }
    add_filter( ‘woocommerce_checkout_fields’, ‘wc_remove_checkout_fields’ );

    /** Added 22 Feb 2021 by Alex to enable SMTP email usage
    *
    * This function will connect wp_mail to your authenticated
    * SMTP server. This improves reliability of wp_mail, and
    * avoids many potential problems.
    *
    * For instructions on the use of this script, see:
    * https://butlerblog.com/easy-smtp-email-wordpress-wp_mail/
    *
    * Values for constants are set in wp-config.php
    */
    add_action( ‘phpmailer_init’, ‘send_smtp_email’ );
    function send_smtp_email( $phpmailer ) {
    $phpmailer->isSMTP();
    $phpmailer->Host = SMTP_HOST;
    $phpmailer->SMTPAuth = SMTP_AUTH;
    $phpmailer->Port = SMTP_PORT;
    $phpmailer->Username = SMTP_USER;
    $phpmailer->Password = SMTP_PASS;
    $phpmailer->SMTPSecure = SMTP_SECURE;
    $phpmailer->From = SMTP_FROM;
    $phpmailer->FromName = SMTP_NAME;
    }

    /* Replace logo based on ‘promotion code’ – Jelmer*/
    add_action( ‘wp_head’, ‘logo_css’, 0 );
    function logo_css() {
    $user = wp_get_current_user();
    $user_info = get_userdata($user->ID);
    $code = $user->promotion_code;
    if( strcasecmp($code, ‘RightBrains’) == 0){
    echo “<style>span.logo{display:none;}</style></head>”;
    echo “<style>div.inner-container{background:url(https://axveco.com/wp-content/uploads/2020/04/rsz_1rightbrains.png) no-repeat;}</style></head>”;
    }
    if( strcasecmp($code, ‘Polaris’) == 0){
    echo “<style>span.logo{display:none;}</style></head>”;
    echo “<style>div.inner-container{background:url(https://axveco.com/wp-content/uploads/2020/04/rsz_polaris.jpg) no-repeat;}</style></head>”;
    }
    if( strcasecmp($code, ‘Nyenrode’) == 0){
    echo “<style>span.logo{display:none;}</style></head>”;
    echo “<style>div.inner-container{background:url(https://axveco.com/wp-content/uploads/2020/03/Logo-Small.png) no-repeat;}</style></head>”;
    }
    if( strcasecmp($code, ‘StrategyWorks’) == 0){
    echo “<style>span.logo{display:none;}</style></head>”;
    echo “<style>div.inner-container{background:url(https://axveco.com/wp-content/uploads/2020/09/SWSA-LOGO-3-1-e1600615027209.png) no-repeat;}</style></head>”;
    }
    if( strcasecmp($code, ‘EXIN’) == 0){
    echo “<style>span.logo{display:none;}</style></head>”;
    echo “<style>div.inner-container{background:url(https://axveco.com/wp-content/uploads/2021/02/Screenshot-2021-02-25-at-16.18.48.png) no-repeat;}</style></head>”;
    }
    if( strcasecmp($code, ‘Beeckestijn’) == 0){
    echo “<style>span.logo{display:none;}</style></head>”;
    echo “<style>div.inner-container{background:url(https://axveco.com/wp-content/uploads/2020/05/Beeckestijn.png) no-repeat;}</style></head>”;
    }
    if( strcasecmp($code, ‘HQAI2021’) == 0){
    echo “<style>span.logo{display:none;}</style></head>”;
    echo “<style>div.inner-container{background:url(https://axveco.com/wp-content/uploads/2020/05/Screenshot-2020-05-01-at-13.53.02.png) no-repeat;}</style></head>”;
    }
    if( strcasecmp($code, ‘Assurant2020’) == 0){
    echo “<style>span.logo{display:none;}</style></head>”;
    echo “<style>div.inner-container{background:url(https://axveco.com/wp-content/uploads/2020/05/rsz_assurant-logo.png) no-repeat;}</style></head>”;
    }
    if( strcasecmp($code, ‘Computrain’) == 0){
    echo “<style>span.logo{display:none;}</style></head>”;
    echo “<style>div.inner-container{background:url(https://axveco.com/wp-content/uploads/2021/02/CT-Small-Logo.png) no-repeat;}</style></head>”;
    }
    if( strcasecmp($code, ‘NCOI’) == 0){
    echo “<style>span.logo{display:none;}</style></head>”;
    echo “<style>div.inner-container{background:url(https://axveco.com/wp-content/uploads/2021/02/NCOI-Small-Logo.png) no-repeat;}</style></head>”;
    }
    if( strcasecmp($code, ‘NCD’) == 0){
    echo “<style>span.logo{display:none;}</style></head>”;
    echo “<style>div.inner-container{background:url(https://axveco.com/wp-content/uploads/2021/03/NCD-Kleiner.png) no-repeat;}</style></head>”;
    }
    if( strcasecmp($code, ‘Randstad’) == 0){
    echo “<style>span.logo{display:none;}</style></head>”;
    echo “<style>div.inner-container{background:url(https://axveco.com/wp-content/uploads/2021/04/Randstad.png) no-repeat;}</style></head>”;
    }
    if( strcasecmp($code, ‘GK2021’) == 0){
    echo “<style>span.logo{display:none;}</style></head>”;
    echo “<style>div.inner-container{background:url(https://axveco.com/wp-content/uploads/2021/04/GK-Logo-small-1.jpg) no-repeat;}</style></head>”;
    }
    }

    /* ‘Edit profile’ redirects to profile page – Jelmer*/
    add_action( ‘load-profile.php’, ‘Redirect_profile_axveco’);
    function Redirect_profile_axveco (){
    if( ! current_user_can( ‘manage_options’ ) )
    exit( wp_safe_redirect( “https://axveco.com/en/profile/&#8221; ) );
    }

    /* Redirect wp-login to loginwp screen – Jelmer*/
    add_filter( ‘login_url’, ‘my_login_page’, 10, 3 );
    function my_login_page( $login_url, $redirect, $force_reauth ) {
    $login_page = “https://axveco.com/en/loginwp/&#8221; ;
    $login_url = add_query_arg( ‘redirect_to’, $redirect, $login_page );
    return $login_url;
    }

    /* Shows headers promotion code in the admin user table – Jelmer*/
    add_filter(‘manage_users_columns’, ‘add_promotion_code_column’);
    function add_promotion_code_column($columns) {
    $columns[‘promotion_code’] = ‘Promotion Code’;
    return $columns;
    }
    /* Shows content promotion code in the admin user table – Jelmer */
    add_action(‘manage_users_custom_column’, ‘show_user_promotion_code_column_content’, 10, 3);
    function show_user_promotion_code_column_content($value, $column_name, $user_id) {
    $user = get_userdata( $user_id );
    if ( ‘promotion_code’ == $column_name )
    return $user->promotion_code;
    return $value;
    }

    /*Archive category page layout JP https://kriesi.at/support/topic/category-archive-page-change-layout-to-show-excerpt
    add_filter(‘avf_blog_style’,’avia_change_category_blog_layout’, 10, 2);
    function avia_change_category_blog_layout($layout, $context){
    if($context == ‘archive’) $layout = ‘single-big’;
    return $layout;
    }*/

    add_filter(‘avf_blog_style’,’avia_change_category_blog_layout’, 10, 2);
    function avia_change_category_blog_layout($layout, $context){
    if($context == ‘archive’) $layout = ‘blog-grid’;
    return $layout;
    }

    add_action(‘wp_footer’, ‘add_custom_tooltip’);
    function add_custom_tooltip(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(‘a’).removeAttr(‘title’);
    jQuery(‘img’).removeAttr(‘title’);
    });
    </script>
    <?php
    }

    /*
    * This function is required to display the location map on the contact us page
    * if removed then the map does not display – API key is from Theme Google services
    */
    add_action(‘wp_footer’, ‘gmaps_workaround’);
    function gmaps_workaround(){
    ?>
    <!–Google Maps JavaScript API –>
    <script src=”https://maps.googleapis.com/maps/api/js?key=AIzaSyCWwtEsgQqGTvuqmzrZMapkbyzqyxCKZBw”
    type=”text/javascript”></script>
    <script type=”text/javascript”>
    jQuery(document).ready(function($){
    setTimeout(function(){
    $(‘#s_pdf_frame’).attr( ‘src’, function ( i, val ) { return val; });
    }, 100);
    });
    </script>
    <?php
    }

    // add_action(‘avia_builder_mode’, “builder_set_debug”);
    function builder_set_debug()
    {
    return “debug”;
    }

    /*
    * this funciton has been updated – see above post in header
    * the original code is: $meta[‘page’][] = ‘events’;
    *
    * Adds PageBuilder to LearnDash Post Typs
    * this is to enable the Advanced Builder in LearnDash – Alex
    * see post at https://kriesi.at/support/topic/learndash-plugin/
    *
    }*/
    add_filter(‘avf_builder_boxes’, ‘add_builder_to_posttype’);
    function add_builder_to_posttype($metabox)
    {
    foreach($metabox as &$meta)
    {
    if($meta[‘id’] == ‘avia_builder’ || $meta[‘id’] == ‘layout’)
    {
    /* original code: $meta[‘page’][] = ‘events’; instead add the name of the custom post type here*/
    $meta[‘page’][] = ‘sfwd-courses’;
    $meta[‘page’][] = ‘sfwd-lessons’;
    $meta[‘page’][] = ‘sfwd-topic’;
    $meta[‘page’][] = ‘sfwd-quiz’;
    }
    }
    return $metabox;
    }

    /*
    * After installing Woocommerce bookings, the events table function was no longer needed
    * I cannot determine whether ‘Events’ post type here is related to events…
    */
    add_action( ‘init’, ‘create_post_type’ );
    function create_post_type() {
    register_post_type( ‘Events’,
    array(
    ‘labels’ => array(
    ‘name’ => __( ‘Events’ ),
    ‘singular_name’ => __( ‘Event’ )
    ),
    ‘public’ => true,
    ‘has_archive’ => false,
    ‘hierarchical’ => true,
    ‘supports’ => array( ‘title’, ‘editor’)
    )
    );

    register_taxonomy(
    ‘event_categories’, //The name of the taxonomy. Name should be in slug form (must not contain capital letters or spaces).
    ‘events’, //post type name
    array(
    ‘hierarchical’ => true,
    ‘label’ => ‘Categories’, //Display name
    ‘query_var’ => true
    )
    );
    }
    /*
    * Goal here is to disable woocommerce from opening the default shop page which is incompatible with
    * our ENFOLD Child theme and appears to be the cause of the Internal Server Error intermittent failure
    * We log that the event has occurred, disbale woocommerce and then redirect to a safe page
    */
    function custom_woocommerce_redirect_shop_page() {
    if (is_shop()) {
    // Send an email to log that this event has occured

    // Get the current user info
    $current_user = wp_get_current_user();
    $username = $current_user->user_login;
    //$is_logged_in = is_user_logged_in() ? ‘Yes’ : ‘No’;

    // Send email notification if logged in (not logged in generates a hit every minute)
    if (is_user_logged_in()) {
    $to = (Email address hidden if logged out) ‘;
    $subject = ‘WooCommerce Shop Page Disable invoked’;
    $message = ‘The WooCommerce shop page open was attempted and has been disabled.’;
    $message .= ‘<br>User: ‘ . $username;
    //$message .= ‘<br>Logged in: ‘ . $is_logged_in;
    $headers = array(‘Content-Type: text/html; charset=UTF-8’);

    wp_mail($to, $subject, $message, $headers);
    }
    // Remove the default WooCommerce content for the shop page
    remove_action(‘woocommerce_archive_description’, ‘woocommerce_taxonomy_archive_description’, 10);
    remove_action(‘woocommerce_archive_description’, ‘woocommerce_product_archive_description’, 10);
    remove_action(‘woocommerce_before_main_content’, ‘woocommerce_output_content_wrapper’, 10);
    remove_action(‘woocommerce_after_main_content’, ‘woocommerce_output_content_wrapper_end’, 10);
    remove_action(‘woocommerce_sidebar’, ‘woocommerce_get_sidebar’, 10);

    // Set up a target page to redirect to
    $alternative_shop_page = “https://axveco.com/en/your-next-step/&#8221; ;

    // Redirect to our own next steps page
    wp_redirect($alternative_shop_page);

    exit;
    }
    }
    add_action(‘template_redirect’, ‘custom_woocommerce_redirect_shop_page’);

    /*
    * End of functions.php
    */
    ?>

    #1469191

    Hi,

    Thank you for the update.

    You can apply a custom field called av_related_category_id to the product and use the ID of the category you’d like to display as its value. We also updated the filter to accommodate these changes.

    add_filter( 'woocommerce_related_products', 'avf_custom_related_products_by_custom_field', 10, 3 );
    
    function avf_custom_related_products_by_custom_field( $related_posts, $product_id, $args ) {
        $category_id = get_post_meta( $product_id, 'av_related_category_id', true );
    
        if ( ! $category_id ) {
            return $related_posts;
        }
    
        $related_products = get_posts( array(
            'posts_per_page' => $args['posts_per_page'],
            'post_type'      => 'product',
            'fields'         => 'ids',
            'tax_query'      => array(
                array(
                    'taxonomy' => 'product_cat',
                    'field'    => 'term_id',
                    'terms'    => $category_id,
                ),
            ),
        ) );
    
        return $related_products;
    }
    

    Best regards,
    Ismael

    #1469161

    Hey Jason,

    What’s going on right now doesn’t affect Enfold or Enfold users in any way.

    We added the Dynamic Content feature ( https://kriesi.at/documentation/enfold/custom-layout-and-dynamic-content/ ) and made it compatible with the ACF plugin. This feature works as expected with the SFC ( https://wordpress.org/plugins/advanced-custom-fields/ ) plugin as well.

    If you notice any compatibility issues with the SCF plugin, please let us know.

    Regards,
    Yigit

    #1469120

    Hey fabio,

    Thank you for the inquiry.

    Related products are generated by WooCommerce, and there is no default option to change which items are shown in the grid. You can try the following filter in the functions.php file to change the related products query but this will affect the site globally.

    add_filter( 'woocommerce_related_products', 'avf_custom_related_products_by_category', 10, 3 );
    
    function avf_custom_related_products_by_category( $related_posts, $product_id, $args ) {
        $category_id = 123; // Replace 123 with your desired category ID
    
        $related_products = get_posts( array(
            'posts_per_page' => $args['posts_per_page'],
            'post_type'      => 'product',
            'fields'         => 'ids',
            'tax_query'      => array(
                array(
                    'taxonomy' => 'product_cat',
                    'field'    => 'term_id',
                    'terms'    => $category_id,
                ),
            ),
        ) );
    
        return $related_products;
    }
    

    Make sure to replace $category_id with the ID of the category that you would like to display.

    Best regards,
    Ismael

    #1468475

    Hi,
    Enfold now supports the Advanced Custom Fields plugin which will help you create Custom Post Types (CPT).
    Screen Shot 2024 10 05 at 7.39.24 AM
    In the Enfold Theme Options ▸ Layout Builder ▸ Show advanced options ▸ Activate Your Custom Post Types For ALB you can enable the Advanced Layout Builder (ALB)
    Screen Shot 2024 10 05 at 7.44.06 AM
    Please see our documentation for further info

    Best regards,
    Mike

Viewing 30 results - 61 through 90 (of 1,633 total)