-
Search Results
-
Hi Support,
I was wondering if there was a way to use a custom template part that is tied to a custom element template.
For example, I am using Advanced Custom Fields and let’s say my custom template part looked something like the following:
<?php /** * Breaker bar * * @param string title * @param string summary */ ?> <?php $title = get_field('breaker_title'); $summary = get_field('breaker_summary'); ?> <section class="breaker"> <div class="container"> <div class="breaker-box"> <div class="breaker-content"> <h2 class="breaker-title"><?php echo $title; ?></h2> <span class="breaker-summary"><?php echo $summary; ?></span> </div> </div> </div> </section>Do you have a base file that I can put in the config-templatebuilder/avia-shortcodes/ that has something like “_get_template_part” to return the above component to where ever the custom element template (CET) was placed on a page?
I did think about creating an actual page template but that would then mean the components are hardcoded to the page, and it would be nice if the user could place that component wherever they wanted on the page.
I’m aware I can modify one of the avia-shortcodes by including it in my child theme, but they all seem to be quite large, I assume because they have all the extra customisation options for the particular component you have copied, but I wouldn’t require those (styling tab, development tab etc), I just want some code to be outputted.
Thanks
SeanHello there,
I’ve come across a PHP Snippet that I am trying to incorporate in my child theme’s functions.php file. My goal is to hide the following section when the user selects the Local Pickup option when checking out:

This is the link to the code that I found, and I’ve attached the code to this post as well.
/** * @snippet Hide Shipping Fields for Local Pickup * @how-to Get CustomizeWoo.com FREE * @sourcecode https://businessbloomer.com/?p=72660 * @author Rodolfo Melogli * @testedwith WooCommerce 3.5.7 * @donate $9 https://businessbloomer.com/bloomer-armada/ */ add_action( 'woocommerce_after_checkout_form', 'bbloomer_disable_shipping_local_pickup' ); function bbloomer_disable_shipping_local_pickup( $available_gateways ) { // Part 1: Hide shipping based on the static choice @ Cart // Note: "#customer_details .col-2" strictly depends on your theme $chosen_methods = WC()->session->get( 'chosen_shipping_methods' ); $chosen_shipping = $chosen_methods[0]; if ( 0 === strpos( $chosen_shipping, 'local_pickup' ) ) { ?> <script type="text/javascript"> jQuery('#customer_details .col-2').fadeOut(); </script> <?php } // Part 2: Hide shipping based on the dynamic choice @ Checkout // Note: "#customer_details .col-2" strictly depends on your theme ?> <script type="text/javascript"> jQuery('form.checkout').on('change','input[name^="shipping_method"]',function() { var val = jQuery( this ).val(); if (val.match("^local_pickup")) { jQuery('#customer_details .col-2').fadeOut(); } else { jQuery('#customer_details .col-2').fadeIn(); } }); </script> <?php }I’m assuming that
'#customer_details .col-2'from the included PHP snippet above needs to be changed to something likewoocommerce-shipping-destinationand"woocommerce-shipping-calculator"Any help is appreciated, thanks very much!
Hi,
there is a new question for another website (link in private content).
The application is divided into 4 fields of 1/4 each. When I activated the privacy policy, the 4th field moved to the second line. The 4th field (the Send button) should be back in the first line on the far right and then the checkbox with the note for the privacy policy below it.
Many thanks and best regards
Topic: Wishlist: Form Alert Message
Hi team
Please add this function to your next Update:
Alert message on Form when required fields not filled.
As Popup Lightbox or like CF7 Form does: on bottom of form with a little message in a box.
On darker templates no chance to see the red borders of required form fields.Millions of ENFOLD customers would appreciate this, believe me.
Thank you
SteveHi I have ACF installed and am using it to add fields to the bottom of my portfolio edit page.
I am adding ACF shortcodes to elements within the ALB.Most are working well but I have uploaded a hero image for each via an ACF upload image field. This field (at the moment) returns an Image URL (for example “https://owe.brother.design/wp-content/uploads/2022/10/3_OxfordStationComp_1120x800.jpeg”
I was hoping to then use the said URL in either a text block eg:
<img class="alignnone size-full wp-image-391" src="[acf field="field_6349785a674e0"]" alt="" width="1120" height="800" />which doesn’t work or somehow within the Media/Image element in ALB.Do you have any advice on how I can do this? Thanks in advance.
Dominic
Topic: Update on ACF support
Has there been any progress on adding ACF (Advanced Custom Fields) support, without writing php templates? It was mentioned that it was on the list of features to be added back before 4.8.
I really ned a quick way to display single listings of a custom post type with custom fields.
Topic: Theme issue in PHP 8.0
Hi I have a site that has been customised to use advanced custom fields to create an online database of the stories of people on local war memorials. I have to update the site from PHP 7.4 to 8.0 but when I do the final page doesn’t show (link below). It currently works as still running 7.4. The server company (one.com) says it is a problem with the theme. I don’t think it is the Enfold theme as it isn’t a problem where I have used it elsewhere. I suspect it is a problem with the child theme where there are additional files (includes and page-templates) to give the needed functionality. I did not write these files and I have very basic PHP knowledge. Can you suggest how I go about resolving the problem please? You have always managed to help me get to the bottom of things in the past.
Thanks
RobHi there,
I’ve seen a lot of those questions here, but none of them worked for me or weren’t suitable for my project.
We got 3 menus which can be selected to be displayed on pages. To do that, I’ve created a custom field with Advanced Custom Fields and written the separate IDs of the 3 menus as options. So far, so good.
But when it comes to changing the menu, it just won’t work. I’ve edited the “helper-main-menu.php” and added the header ID to the arguments before calling wp_nav_menu:if(get_field('header_selection')) { $headerID = get_field('header_selection'); $args = array( 'menu' => $headerID, 'theme_location' => $avia_theme_location, 'menu_id' => $avia_menu_class, 'menu_class' => 'menu av-main-nav', 'container_class' => $avia_menu_class.' av-main-nav-wrap'.$icon_beside, 'items_wrap' => '<ul role="menu" class="%2$s" id="%1$s">%3$s</ul>', 'fallback_cb' => 'avia_fallback_menu', 'echo' => false, 'walker' => new avia_responsive_mega_menu() ); } else { ..(args without menu-id).. }But it just wont display the right menu. If I remove “theme_location”, it will work, but the styling is way off and it isn’t really working perfectly.
As you can see, I’m not afraid to code, so please don’t suggest other plugins. I really need that to be done manually with ACF.
Thanks in advance!












