Hey Ismael,
wow, many thanks, it works, but I wasn’t exact enough. I meant only subcategories a certain product is assigned to. If a certain product category has subcategories A, B and C and a product is assigned to A and C then only A and C should be displayed. Possible?
By activating custom elements in Enfold settings it’s possible to insert WP Post Data or ACF fields. And there are also Dynamic WP Custom Fields like Theme Custom Field Shortcodes ({av_dynamic_el src=”wp_custom_field” key=”%metakey%” default=”” link=”” linktext=”” format=””}).And so I thought I can use this. But how?
Thanks again
Stefan
Hey westefan,
Thank you for the inquiry.
What do you mean by “dynamic WP custom fields”? If you want to display the subcategories of a specific parent category, you can try this shortcode in the functions.php file:
function av_display_product_subcategories_shortcode( $atts ) {
$atts = shortcode_atts( array(
'category_id' => '',
), $atts, 'display_subcategories' );
$category_id = intval( $atts['category_id'] );
if ( !$category_id ) {
return 'Please provide a valid main category ID.';
}
$args = array(
'taxonomy' => 'product_cat',
'parent' => $category_id,
'hide_empty' => false,
);
$subcategories = get_terms( $args );
if ( empty( $subcategories ) || is_wp_error( $subcategories ) ) {
return 'No subcategories found for this category.';
}
$output = '<ul>';
foreach ( $subcategories as $subcategory ) {
$output .= '<li>' . esc_html( $subcategory->name ) . '</li>';
}
$output .= '</ul>';
return $output;
}
add_shortcode( 'av_display_subcategories', 'av_display_product_subcategories_shortcode' );
You can use the shortcode in a Text or Code Block element.
[av_display_subcategories category_id="123"]
Best regards,
Ismael
Hi,
is it possible with dynamic WP custom fields to display a product sub category of a certain main category ID within a text field?
Thanks, Stefan
Hi,
Please see my previous thread as to where I am coming from:
I am wondering is it possible to put out like an IF statement in custom templates with ACF.
For example, I have ten ACF fields, but most entries I only have data for five of those fields.
It would look much better if I don’t have data for an ACF field, then that ACF field did not show.
E.g. If my ACF field is URL I want it to show like this is there is a URL:
Link: http://www.websitey.com
But I don’t want it to show like this if there is not a URL:
Link:
Thanks for any advice that can be offered.
Lucy
Hi,
Mouse over on the images, Title and introduction text. Can this be done within Enfold??
This is possible but it will require a bit of modifications such as assigning custom fields to the portfolio items. If you want to continue, please follow these steps:
1.) Add this code in the functions.php file to register a new attribute the portfolio image which uses the value of the av_portfolio_hover_image custom field.
function avf_add_custom_field_as_hover_image($attrs, $entry) {
$hover_image_url = get_post_meta($entry->ID, 'av_portfolio_hover_image', true);
if (!empty($hover_image_url)) {
$attrs['data-hover-image'] = esc_url($hover_image_url);
}
return $attrs;
}
add_filter('avf_portfolio_image_attrs', 'avf_add_custom_field_as_hover_image', 10, 2);
2.) Then add this script to create the hover effect:
function ava_custom_script_hover_image() {
?>
<script>
(function ($) {
function hoverImageChange() {
$('.grid-sort-container .grid-entry img').each(function () {
var $img = $(this);
var originalSrc = $img.attr('src');
var hoverImage = $img.data('hover-image');
if (hoverImage) {
$img.hover(
function () {
$img.stop().fadeOut(200, function () {
$img.attr('src', hoverImage).fadeIn(200);
});
},
function () {
$img.stop().fadeOut(200, function () {
$img.attr('src', originalSrc).fadeIn(200);
});
}
);
}
});
}
$(document).ready(function () {
hoverImageChange();
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'ava_custom_script_hover_image');
3.) Edit any portfolio items, apply the av_portfolio_hover_image custom field and place the URL of the hover image.
4.) Add this css code to disable the default image overlay
.grid-entry a .image-overlay {
display: none !important;
}
Best regards,
Ismael
Hi,
Sorry I see your point now, you can only have one Portfolio Items Base, I recommend using posts and categories to have
/treatments/[name of treatment]
/treatment-area/[name treatment area]
or you could create a CPT with Advanced Custom Fields (ACF), but it won’t be a Portfolio Item.
or you could try a plugin like Custom Permalinks but I don’t know if it will work with the masonry element.
Best regards,
Mike
Thank you Mike.
I am trying this now.
But does this mean that I have to edit every “Journal” item individually? There are thousands. I thought they’d be a way to say, if post type = X then put out these custom fields. I didn’t think I’d have to do it page by page.
Thanks
Lucy
Hi Günter
Thanks for your reply.
The documentation is good, however is doesn’t explain why all the form fields are missing when i create a custom element from a contact form. IMAGE 1 is a form created in the normal way and IMAGE 2 is the same for saved as a Custom Element. As you can see all the form fields apart from the first one are missing and there isn’t a way to add them back in to the Custom Element.
Regards
Colin
Hi
I am trying to create a email sign-up form as a custom element that can be used throughout a site. However, it appears that when you save a form as a custom element or even create a custom element from scratch it only allows one contact form element in the customize page (see image) and you cannot add any more form elements.
Do you know how I can include more fields? I would like, name and email address and then the submit button.
Regards
Colin
Hi,
I’ve been struggling for a few days now trying to work out how to apply a custom template to a category so I can change the look and feel of the post pages for the posts belonging to that category. Ultimately I want to add ACF fields to them. My site is in maitenance mode at the moment, but I’m incluing my admin access details.
How can I get a page like this to show some ACF custom fields and also modify the look of it a bit (I think the image is too big)?
https://guardingtheguards.com/journal/garda-review-feb-1980/
Is there a tutorial on how to this? I’m so frustrated working on this for days and getting nowwhere!
Thanks
Lucy
Hi Enfold!
I’m really excited about the new feature for using ALB and templates for Custom Post Types / dynamic content! It’s great that you’ve made this possible!
First question:
I’m now trying to apply it to our website. I can get the content from the Title and custom fields to display, but not the featured image ({wp_custom_field:_thumbnail_id}) or an image that has been set via a custom upload field in the post ({acf_field_66a25d0c4bbd2:smbk-foto}).
I don’t see any picture: https://ikwilopvallen.nl/smoelenboek/rene-nederhof/
What am I doing wrong?
Second question:
In your video, I see that for the page overview ‘Books’, the posts are added manually in a standard element (https://ikwilopvallen.nl/activiteiten/). Is it not possible to create a custom template for the Custom Posts as well, and then load it onto that page via the ‘Custom Layout’ element on the ‘books’ page, so that ALL CUSTOM POSTS are automatically displayed there?
Thanks in advance,
Ita
Hey Rustum,
Thank you for the inquiry.
Please note that the dynamic content feature is limited to fields with the orange database icon beside them. It will not work with the Custom ID Attribute or Custom CSS Class fields. You will need to add the ID manually.
Best regards,
Ismael
Hi,
Thank you for posting the temporary solution.
As I do not have a test environment with such many posts: could you please check if adding a limit (as WP does) would help?
e.g. like
add_filter('avf_query_default_custom_fields_limit', function($limit) { return 300; });
Thank you for your help in advance.
Best regards,
Günter
Temporary fix for anyone experiencing the same issue (until the authors of Enfold fix this issue permanently):
Add this to your child theme’s functions.php:
// Enfold 6.0 slow query fix
add_filter('avf_before_query_wp_default_custom_fields', function($custom_fields) { return []; });
The dynamic custom fields don’t work anymore with this line, but at least your website is working again.
We had to revert back to Enfold 5.7. Or you can add this to your child theme’s functions.php as a temporary fix until the authors of Enfold fix this issue:
// Enfold 6.0 slow query fix
add_filter('avf_before_query_wp_default_custom_fields', function($custom_fields) { return []; });
The dynamic custom fields don’t work anymore with this line, but at least your website is working again.
The issue is that the theme queries all the meta keys from the postmeta table every time this function is called. This can cause significant slowdown on websites with a large number of posts or custom fields. This problem has resulted in increased CPU usage in version 6.0. Is there anything we can do to address this issue?
-
This topic was modified 1 year, 8 months ago by
emanar.
-
This topic was modified 1 year, 8 months ago by
emanar.
We will this investigate at our end (why indexes are not used properly), we’re running several servers where this issue all occur.
You have to keep in mind that not all hostingservers are equally configured. We are probably not the only one running into this.
I understand the need of retrieving all custom fields, but I’m sure there are better ways (performance wise) to achieve this (using WP transients, retrieving them with a WP Cron and so on..).
Hi,
I checked the query on my localhost:

Can you check that meta_key is an index on your install and maybe also try to reindex it. Sounds a bit strange that an SQL Server does not use an index.
If you do not need the custom field feature added with 6.0 disable it in theme option Enfold->Template Builder-> Custom Layout And Dynamic Content.
Our query is based on the WP query in ..\wp-admin\includes\template.php function meta_form() which fills the custom fields when editing a post. This query is limited to 30 entries by default.
There are also several filters for our query (see ..\config-templatebuilder\avia-template-builder\php\class-dynamic-content.php function get_default_custom_fields() ) – even to shortcut it or to limit:
$limit = apply_filters( 'avf_query_default_custom_fields_limit', 0 );
But we offer the custom fields in dropdowns to be selected by users – not showing all might result in being not user friendly. There is much depending on your application.
If you know exactly which custom fields are needed you can return this set hardcoded with filter:
/**
* Allow to short circuit the query against post meta table.
* Return an array filled with the keys.
* Query for _ only might get much longer than other queries
*
* @since 6.0
* @param array|null $keys
* @param bool $filter
* @param int $limit
* @return array|null
*/
$wp_custom_fields = apply_filters( 'avf_before_query_wp_default_custom_fields', null, $filter, $limit );
Best regards,
Günter
Hey beverlystone,
Thank you for the inquiry.
You should be able to use custom fields to create links between pages in different languages. Here’s how:
1.) Edit the page in English (EN) language. Create a custom field named “language_switch_url” and enter the URL of the corresponding page in French (FR).
2.) Repeat this process for the page in French (FR) language, making sure you use the URL of the English (EN) page in the “language_switch_url” custom field.
3.) Finally, add the following code to your theme’s functions.php file to create a language switcher after the main menu:
add_action('ava_after_main_menu', function () {
$switch_url = get_field('language_switch_url');
if ($switch_url) {
?>
<div class="av-custom-language-switcher">
<a href="<?php echo esc_url($switch_url); ?>">
<?php _e('Switch to Other Language', 'avia_framework'); ?>
</a>
</div>
<?php
}
}, 10, 1);
Best regards,
Ismael
Hey janssen-media,
Thank you for using Enfold.
If you choose “wp_post_title” it is always of the current post title where the element is added.
What you need is use of custom fields where you can enter values specific for the post. You can use the ACF plugin for easier handling.
E.g. define “toggle1”, “toggle2” as custom fields, add values there and then use these custom fields as dynamic content.
If you create a custom layout with that toggle you can add this custom layout to any page/post where you need it and then need only fill in the custom fields values as needed.
Hope this helps.
Best regards,
Günter
Hi,
Thank you for the update.
If there is another way to target individual items let me know that as well.
The theme automatically adds unique IDs (e.g., av-lxxntb3b-96793073ee8d9b43abc1bef7251d9ab3) to the elements, which can be used to adjust their styles or run scripts. Besides this, you can also add custom CSS class names or IDs to the elements by editing them and applying the values in the Advanced > Developer Settings toggle. Look for the Custom CSS Class Name or Custom ID Attribute fields. For more info, please check the links below:
// https://kriesi.at/documentation/enfold/add-custom-css/#enable-custom-css-class-name-support
Here’s how to inspect the elements:
// https://kriesi.at/documentation/enfold/add-custom-css/#how-to-inspect-an-element-on-the-page
Best regards,
Ismael
Hey waterwalk,
Thank you for the inquiry.
There will be a new feature called Dynamic Content in the upcoming version, but it’s not available yet. For now, you will have to directly modify the category page template and add the ACF field manually.
// https://www.advancedcustomfields.com/resources/displaying-custom-field-values-in-your-theme/
Best regards,
Ismael
Hi,
I recently added the ACF custom field plugin because I need an additional field on the category page. I can see it on the back end (admin) but the field content does not display on the front end. I saw several people posting about ACF support but it’s not clear if Enfold supports ACF yet or not. Thx.
### WordPress Environment ###
WordPress address (URL): https://www.seemann-henschel.de
Site address (URL): https://www.seemann-henschel.de
WC Version: 8.9.0
REST API Version: ✔ 8.9.0
Action Scheduler Version: ✔ 3.7.4
Log Directory Writable: ✔
WP Version: 6.5.3
WP Multisite: –
WP Memory Limit: 512 MB
WP Debug Mode: –
WP Cron: ✔
Language: de_DE_formal
External object cache: –
### Server Environment ###
Server Info: Apache
PHP Version: 8.1.19
PHP Post Max Size: 96 MB
PHP Time Limit: 300
PHP Max Input Vars: 10000
cURL Version: 7.38.0
OpenSSL/1.0.2l
SUHOSIN Installed: –
MySQL Version: 5.7.25
Max Upload Size: 96 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔
### Database ###
WC Database Version: 8.9.0
WC Database Prefix: wp_
Datenbank-Gesamtgröße: 200.84MB
Datenbank-Datengröße: 161.84MB
Datenbank-Indexgröße: 39.00MB
wp_woocommerce_sessions: Daten: 0.06MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_api_keys: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_attribute_taxonomies: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_downloadable_product_permissions: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_order_itemmeta: Daten: 1.52MB + Index: 0.67MB + Engine InnoDB
wp_woocommerce_tax_rates: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_tax_rate_locations: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zones: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_shipping_zone_locations: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_woocommerce_shipping_zone_methods: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_payment_tokens: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_payment_tokenmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_log: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_access: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2022_01: Daten: 1.52MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2022_02: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2022_03: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2022_04: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2022_05: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2022_06: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2022_07: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2022_08: Daten: 3.17MB + Index: 0.14MB + Engine InnoDB
matomo_archive_blob_2022_09: Daten: 2.52MB + Index: 0.16MB + Engine InnoDB
matomo_archive_blob_2022_10: Daten: 3.52MB + Index: 0.17MB + Engine InnoDB
matomo_archive_blob_2022_11: Daten: 3.52MB + Index: 0.14MB + Engine InnoDB
matomo_archive_blob_2022_12: Daten: 3.52MB + Index: 0.17MB + Engine InnoDB
matomo_archive_blob_2023_01: Daten: 3.52MB + Index: 0.17MB + Engine InnoDB
matomo_archive_blob_2023_02: Daten: 3.41MB + Index: 0.14MB + Engine InnoDB
matomo_archive_blob_2023_03: Daten: 3.52MB + Index: 0.13MB + Engine InnoDB
matomo_archive_blob_2023_04: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2023_05: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2023_06: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2023_07: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2023_08: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2023_09: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2023_10: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2023_11: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2023_12: Daten: 0.33MB + Index: 0.05MB + Engine InnoDB
matomo_archive_blob_2024_01: Daten: 3.52MB + Index: 0.16MB + Engine InnoDB
matomo_archive_blob_2024_02: Daten: 0.31MB + Index: 0.05MB + Engine InnoDB
matomo_archive_blob_2024_03: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2024_04: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_blob_2024_05: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_invalidations: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_archive_numeric_2022_01: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2022_02: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2022_03: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2022_04: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2022_05: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2022_06: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2022_07: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2022_08: Daten: 0.20MB + Index: 0.22MB + Engine InnoDB
matomo_archive_numeric_2022_09: Daten: 0.20MB + Index: 0.27MB + Engine InnoDB
matomo_archive_numeric_2022_10: Daten: 0.27MB + Index: 0.30MB + Engine InnoDB
matomo_archive_numeric_2022_11: Daten: 0.31MB + Index: 0.31MB + Engine InnoDB
matomo_archive_numeric_2022_12: Daten: 0.25MB + Index: 0.33MB + Engine InnoDB
matomo_archive_numeric_2023_01: Daten: 0.25MB + Index: 0.27MB + Engine InnoDB
matomo_archive_numeric_2023_02: Daten: 0.20MB + Index: 0.23MB + Engine InnoDB
matomo_archive_numeric_2023_03: Daten: 0.16MB + Index: 0.22MB + Engine InnoDB
matomo_archive_numeric_2023_04: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2023_05: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2023_06: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2023_07: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2023_08: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2023_09: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2023_10: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2023_11: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2023_12: Daten: 0.08MB + Index: 0.06MB + Engine InnoDB
matomo_archive_numeric_2024_01: Daten: 0.31MB + Index: 0.30MB + Engine InnoDB
matomo_archive_numeric_2024_02: Daten: 0.05MB + Index: 0.06MB + Engine InnoDB
matomo_archive_numeric_2024_03: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2024_04: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_archive_numeric_2024_05: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_brute_force_log: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_changes: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_custom_dimensions: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_goal: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
matomo_locks: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
matomo_logger_message: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
matomo_log_action: Daten: 0.36MB + Index: 0.09MB + Engine InnoDB
matomo_log_conversion: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
matomo_log_conversion_item: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_log_link_visit_action: Daten: 0.20MB + Index: 0.16MB + Engine InnoDB
matomo_log_profiling: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_log_visit: Daten: 1.52MB + Index: 0.45MB + Engine InnoDB
matomo_option: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_plugin_setting: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_privacy_logdata_anonymizations: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_report: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
matomo_report_subscriptions: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_segment: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
matomo_sequence: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
matomo_session: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
matomo_site: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
matomo_site_setting: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_site_url: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
matomo_tracking_failure: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
matomo_twofactor_recovery_code: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
matomo_user: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
matomo_user_dashboard: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
matomo_user_language: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
matomo_user_token_auth: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_actions: Daten: 11.54MB + Index: 4.39MB + Engine MyISAM
wp_actionscheduler_claims: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_actionscheduler_groups: Daten: 0.00MB + Index: 0.01MB + Engine MyISAM
wp_actionscheduler_logs: Daten: 11.51MB + Index: 7.18MB + Engine MyISAM
wp_borlabs_cookie_consent_log: Daten: 1.64MB + Index: 0.46MB + Engine MyISAM
wp_borlabs_cookie_content_blocker: Daten: 0.01MB + Index: 0.00MB + Engine MyISAM
wp_borlabs_cookie_cookies: Daten: 0.01MB + Index: 0.00MB + Engine MyISAM
wp_borlabs_cookie_groups: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_borlabs_cookie_script_blocker: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_borlabs_cookie_statistics: Daten: 0.46MB + Index: 0.46MB + Engine MyISAM
wp_commentmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Daten: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_duplicator_pro_entities: Daten: 0.01MB + Index: 0.00MB + Engine MyISAM
wp_duplicator_pro_packages: Daten: 0.17MB + Index: 0.00MB + Engine MyISAM
wp_easywpsmtp_debug_events: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_easywpsmtp_tasks_meta: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_layerslider: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_layerslider_drafts: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_layerslider_revisions: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_links: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_novalnet_aff_account_detail: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_novalnet_aff_user_detail: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_novalnet_callback_history: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_novalnet_subscription_details: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_novalnet_transaction_detail: Daten: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_options: Daten: 7.23MB + Index: 1.20MB + Engine InnoDB
wp_pmxi_files: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_pmxi_hash: Daten: 0.01MB + Index: 0.01MB + Engine MyISAM
wp_pmxi_history: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_pmxi_images: Daten: 0.44MB + Index: 0.00MB + Engine InnoDB
wp_pmxi_imports: Daten: 0.14MB + Index: 0.00MB + Engine InnoDB
wp_pmxi_posts: Daten: 0.05MB + Index: 0.00MB + Engine InnoDB
wp_pmxi_templates: Daten: 0.05MB + Index: 0.00MB + Engine InnoDB
wp_postmeta: Daten: 51.14MB + Index: 12.36MB + Engine InnoDB
wp_posts: Daten: 31.06MB + Index: 1.31MB + Engine InnoDB
wp_redirection_404: Daten: 2.02MB + Index: 0.31MB + Engine InnoDB
wp_redirection_groups: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_redirection_items: Daten: 0.05MB + Index: 0.09MB + Engine InnoDB
wp_redirection_logs: Daten: 0.14MB + Index: 0.05MB + Engine InnoDB
wp_snippets: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_storeabill_documentmeta: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_storeabill_documents: Daten: 0.00MB + Index: 0.01MB + Engine MyISAM
wp_storeabill_document_itemmeta: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_storeabill_document_items: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_storeabill_document_noticemeta: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_storeabill_document_notices: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_storeabill_journals: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_termmeta: Daten: 0.05MB + Index: 0.03MB + Engine InnoDB
wp_terms: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_term_relationships: Daten: 0.09MB + Index: 0.06MB + Engine InnoDB
wp_term_taxonomy: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_usermeta: Daten: 0.08MB + Index: 0.03MB + Engine InnoDB
wp_users: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_admin_notes: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_admin_note_actions: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_category_lookup: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_customer_lookup: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_download_log: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_orders: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wc_orders_meta: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wc_order_addresses: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wc_order_coupon_lookup: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_operational_data: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wc_order_product_lookup: Daten: 0.09MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_stats: Daten: 0.16MB + Index: 0.14MB + Engine InnoDB
wp_wc_order_tax_lookup: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_product_attributes_lookup: Daten: 0.01MB + Index: 0.03MB + Engine MyISAM
wp_wc_product_download_directories: Daten: 0.00MB + Index: 0.01MB + Engine MyISAM
wp_wc_product_meta_lookup: Daten: 0.06MB + Index: 0.09MB + Engine InnoDB
wp_wc_rate_limits: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wc_reserved_stock: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wc_tax_rate_classes: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_webhooks: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_gzd_dhl_im_products: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_gzd_dhl_im_product_services: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_gzd_dhl_labelmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_gzd_dhl_labels: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_gzd_packaging: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_gzd_packagingmeta: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_gzd_shipmentmeta: Daten: 0.06MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_gzd_shipments: Daten: 0.22MB + Index: 0.14MB + Engine InnoDB
wp_woocommerce_gzd_shipment_itemmeta: Daten: 0.28MB + Index: 0.38MB + Engine InnoDB
wp_woocommerce_gzd_shipment_items: Daten: 0.22MB + Index: 0.31MB + Engine InnoDB
wp_woocommerce_gzd_shipment_labelmeta: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_gzd_shipment_labels: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_gzd_shipping_provider: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_gzd_shipping_providermeta: Daten: 0.06MB + Index: 0.03MB + Engine InnoDB
wp_woof_query_cache: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woof_sd: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_yoast_indexable: Daten: 0.39MB + Index: 0.11MB + Engine MyISAM
wp_yoast_indexable_hierarchy: Daten: 0.02MB + Index: 0.07MB + Engine MyISAM
wp_yoast_migrations: Daten: 0.00MB + Index: 0.01MB + Engine MyISAM
wp_yoast_primary_term: Daten: 0.00MB + Index: 0.01MB + Engine MyISAM
wp_yoast_seo_links: Daten: 0.23MB + Index: 0.07MB + Engine MyISAM
wp_yoast_seo_meta: Daten: 1.72MB + Index: 1.84MB + Engine MyISAM
### Post Type Counts ###
acf-field: 29
acf-field-group: 2
attachment: 3114
avia_framework_post: 37
customize_changeset: 3
cwginstocknotifier: 500
document_template: 5
invoice: 4
itsec-dash-card: 8
itsec-dashboard: 1
nav_menu_item: 72
oembed_cache: 7
page: 55
post: 53
product: 317
revision: 1836
sh_event: 55
shop_order: 1443
shop_order_refund: 1
wp_global_styles: 1
wpcf7_contact_form: 3
### Security ###
Secure connection (HTTPS): ✔
Hide errors from visitors: ✔
### Active Plugins (30) ###
Advanced Custom Fields: von WP Engine – 6.2.9
Autoptimize: von Frank Goossens (futtta) – 3.1.11
Back In Stock Notifier for WooCommerce | WooCommerce Waitlist Pro: von codewoogeek – 5.3.2
BackWPup: von WP MEDIA SAS – 4.0.4
Borlabs Cookie - Cookie Opt-in: von Borlabs GmbH – 2.2.67
Contact Form 7 to NEWSTROLL api: von NEWSTROLL.de – 1.0.0
Classic Editor: von WordPress-Mitwirkende – 1.6.3
Classic Widgets: von WordPress-Mitwirkende – 0.3
Contact Form 7: von Takayuki Miyoshi – 5.9.4
Disable Comments: von WPDeveloper – 2.4.6
Easy WP SMTP: von Easy WP SMTP – 2.3.0
Enable Media Replace: von ShortPixel – 4.1.5
Limit Login Attempts Reloaded: von Limit Login Attempts Reloaded – 2.26.9
Loco Translate: von Tim Whitlock – 2.6.9
One Stop Shop für WooCommerce: von vendidero – 1.6.2
Redirection: von John Godley – 5.4.2
Regenerate Thumbnails: von Alex Mills (Viper007Bond) – 3.1.6
Seemann Henschel Import Cron: von clickstorm GmbH – 1.0
SVG Support: von Benbodhi – 2.5.5
Germanized für WooCommerce Pro: von vendidero – 3.10.2
Germanized für WooCommerce: von vendidero – 3.16.5
Google Analytics for WooCommerce: von WooCommerce – 2.0.7
heidelpay WooCommerce: von heidelpay – 1.6.0
HUSKY - Products Filter Professional for WooCommerce: von realmag777 – 1.3.5.3
WooCommerce: von Automattic – 8.9.0
Yoast SEO: von Team Yoast – 22.7
WP All Import Pro: von Soflyy – 4.8.5
WP Crontrol: von John Blackbourn – 1.16.3
WP All Import - ACF Add-On: von Soflyy – 3.3.8
WP All Import - WooCommerce Import Add-On Pro: von Soflyy – 4.0.0
### Inactive Plugins (0) ###
### Must Use Plugins (1) ###
WP Migrate DB Compatibility: von Delicious Brains – 1.2
### Settings ###
API Enabled: –
Force SSL: –
Currency: EUR (€)
Currency Position: right_space
Thousand Separator: .
Decimal Separator: ,
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)
Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)
Connected to WooCommerce.com: –
Enforce Approved Product Download Directories: –
HPOS feature enabled: –
Order datastore: WC_Order_Data_Store_CPT
HPOS data sync enabled: –
### Logging ###
Enabled: ✔
Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2
Retention period: 30 Tage
Level threshold: –
Log directory size: 793 kB
### WC Pages ###
Shop-Basis: #506 - /shop/
Warenkorb: #507 - /warenkorb-2/
Kasse: #28 - /checkout/
Ihr Konto: #14 - /mein-konto/
Allgemeine Geschäftsbedingungen: #697 - /agb/
### Theme ###
Name: Enfold Child
Version: 1.0
Author URL: http://kriesi.at
Child Theme: ✔
Parent Theme Name: Enfold
Parent Theme Version: 5.7.1
Parent Theme Author URL: https://kriesi.at
WooCommerce Support: ✔
### Templates ###
Overrides: enfold-child/woocommerce/checkout/thankyou.php Version 3.7.0 ist veraltet. Die Hauptversion ist 8.1.0
enfold-child/woocommerce/single-product/meta.php
enfold-child/woocommerce/single-product/product-image.php Version 3.5.1 ist veraltet. Die Hauptversion ist 7.8.0
enfold-child/woocommerce/single-product/short-description.php
enfold-child/woocommerce/single-product/title.php
Outdated Templates: ❌
Erfahren Sie
wie Sie aktualisieren können
### Admin ###
Enabled Features: activity-panels
analytics
product-block-editor
coupons
core-profiler
customize-store
customer-effort-score-tracks
import-products-task
experimental-fashion-sample-products
shipping-smart-defaults
shipping-setting-tour
homescreen
marketing
mobile-app-banner
navigation
onboarding
onboarding-tasks
product-variation-management
product-virtual-downloadable
product-external-affiliate
product-grouped
product-linked
product-pre-publish-modal
product-custom-fields
remote-inbox-notifications
remote-free-extensions
payment-gateway-suggestions
shipping-label-banner
subscriptions
store-alerts
transient-notices
woo-mobile-welcome
wc-pay-promotion
wc-pay-welcome-page
Disabled Features: minified-js
new-product-management-experience
settings
async-product-editor-category-field
launch-your-store
Daily Cron: ✔ Next scheduled: 2024-05-15 09:25:07 +02:00
Options: ✔
Notes: 19
Onboarding: completed
### Action Scheduler ###
Abgeschlossen: 30.144
Oldest: 2024-04-14 09:49:19 +0200
Newest: 2024-05-15 09:45:13 +0200
Fehlgeschlagen: 2.204
Oldest: 2020-11-09 15:53:52 +0100
Newest: 2024-05-13 14:47:24 +0200
Ausstehend: 10
Oldest: 2024-05-15 09:50:05 +0200
Newest: 2024-05-16 05:01:00 +0200
### Status report information ###
Generated at: 2024-05-15 09:49:53 +02:00
Hey peterolle,
Thank you for the inquiry.
You can add extra items to the default product tabs by using the woocommerce_product_tabs filter. Usage examples are available in the documentation below:
// https://woocommerce.com/document/editing-product-data-tabs/#section-5
In the woo_new_product_tab_content function, you can add custom fields, display another product, or insert custom content.
Best regards,
Ismael
Hi there
We use the following code snippet to send an info to a special shop manager at checkout
// Add checkout fields
function custom_checkout_field( $checkout ) {
// echo '<fieldset><legend>Zusätzliche Angaben</legend>';
$options = array();
$nicknames = array();
$args = array( 'role' => 'shop_manager' );
$users = get_users( $args );
foreach ( $users AS $user ) :
$user_id = $user->ID;
$user_info = get_userdata( $user_id );
$options[$user_id] = $user_info->first_name.' '.$user_info->last_name.' ('.$user_info->nickname.')';
foreach ( explode( ', ', $user_info->nickname ) as $nickname )
$nicknames[$nickname] = $nickname;
endforeach;
woocommerce_form_field( 'user_id', array(
'type' => 'select',
'class' => array( 'user_id form-row-first' ),
'label' => __( 'Cost center group' ),
'required' => true,
'options' => $options
), $checkout->get_value( 'user_id' ) );
woocommerce_form_field( 'cost_center', array(
'type' => 'select',
'class' => array( 'cost_center form-row-last' ),
'label' => __( 'Cost center' ),
'required' => true,
'options' => $nicknames
), $checkout->get_value( 'cost_center' ) );
// echo '</fieldset>';
}
add_action( 'woocommerce_after_checkout_billing_form', 'custom_checkout_field' );
function custom_checkout_field_process() {
/* if ( !str_contains( $_POST['first_name_1'], 'wf-ib.de' ) ) // Checkout: Email validation
wc_add_notice( __( '<strong>E-Mail-Adresse:</strong> Es sind nur E-Mail-Adressen mit der Domainendung wf-ib.de zulässig.' ), 'error' ); */
if ( !$_POST['user_id'] )
wc_add_notice( sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . __( 'Cost center group' ) . '</strong>' ), 'error' );
if ( !$_POST['cost_center'] )
wc_add_notice( sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . __( 'Cost center' ) . '</strong>' ), 'error' );
}
add_action( 'woocommerce_checkout_process', 'custom_checkout_field_process' );
function custom_checkout_field_update_order_meta( $order_id ) {
if ( !empty( $_POST['user_id'] ) )
update_post_meta( $order_id, 'user_id', intval( $_POST['user_id'] ) );
if ( !empty( $_POST['cost_center'] ) )
update_post_meta( $order_id, 'cost_center', sanitize_text_field( $_POST['cost_center'] ) );
}
add_action( 'woocommerce_checkout_update_order_meta', 'custom_checkout_field_update_order_meta' );
function custom_checkout_field_display_admin_order_meta( $order ) {
$user_id = get_post_meta( $order->id, 'user_id', true );
$cost_center = get_post_meta( $order->id, 'cost_center', true );
$user_info = get_userdata( $user_id );
echo '<p><strong>'.__( 'Cost center' ).'</strong>: '.$user_info->first_name.' '.$user_info->last_name.' ('.$cost_center.') <'.$user_info->user_email.'></p>';
}
add_action( 'woocommerce_admin_order_data_after_billing_address', 'custom_checkout_field_display_admin_order_meta', 10, 1 );
The order meta for user_id and cost_center are not saved by the hook woocommerce_checkout_update_order_meta. The big question now is why? We use a very similar code snippet in other projects and there it works without problems. Does Enfold prevent something?
-
This topic was modified 1 year, 10 months ago by
RENZCOM.
-
This topic was modified 1 year, 10 months ago by
RENZCOM.
Hey Robert Sink,
Thanks for your question, for products we recommend the WooCommerce plugin and it allows product variations.
To add custom fields to the checkout there are a few different plugins that you can use, while I don’t recommend any specific one and have not tested all of them, I tried the free Checkout Field Editor for WooCommerce and it allowed me to add a test field to my demo site. So I imagine the others will also work for you, you can try them and see which one works best for you.
Please note that we can’t ensure that all plugins will work with the theme, as there are tens of thousands of them, but typically I would expect that you will find a few that will work fine.
Best regards,
Mike
Robert SinkGuest
Hello,
I am interested in purchasing the license for Enfold.
Does this theme allow you to add product variations to your product?
Also can you do custom fields at checkout?
Do the custom fields allow for form validation?
Hi,
unfortunately I can’t insert the letter “e” in the fields of CSS or ID or other fields (in the editor I can insert “e”) of Element contet of Avia editor.
For example: if I insert a text block widget, I can use without any problem the editor, but if I want insert a class name like “title” in the field of “Custom CSS class” I can wrote only “titl”. This problem is every widget not only in the text block widget.
Have you any advise? I just update the theme to 5.7 version.
Thank you!
Best regards,
Andrea
Hi,
Yes, that’s correct. However, some code combinations may conflict with the Advanced Layout Builder when included in the Code Block element, so it is best to avoid them. In such cases, the best solution is to create a custom shortcode or dynamically embed the code using a custom script.
Example:
function avs_custom_form_shortcode_cb() {
ob_start();
?>
<form id="custom-form">
.. input fields
</form>
<script>
console.log('This is an additional script tag.');
</script>
<?php
return ob_get_clean();
}
add_shortcode('avs_custom_form', 'avs_custom_form_shortcode_cb');
You can then use the shortcode [avs_custom_form] in a text or code block element.
Best regards,
Ismael