-
Search Results
-
Good day, everyone!
While I wait to get some sort of support for ACF, I have been trying to manually map in custom post types, fields and taxonomies. But, after doing all of the work on building templates, I just realized the old select Template drop-down does not seem o appear in post, or any post type in the edit post option. I reverted back my templates, thinking maybe I screwed them up, but I still do not have the option to select any of them.
Am I missing something obvious?
I have copied files from the Enfold core theme files into the child theme folder (see private content)
I have also looked around on the net and tried the various other suggestions I could find, but nothing seems to get that drop-down back.
I am trying to exclude posts (woocommerce products) which have a specific category (id=340) from the ‘avia_ajax_search’ popup.
have copied the function if(!function_exists(‘avia_ajax_search’))from /enfold/functions-enfold.php to /enfold-child/functions.php
Is this correct, or do i need a seperate /enfold-child/functions-enfold.phpif(!function_exists('avia_ajax_search')) { //now hook into wordpress ajax function to catch any ajax requests add_action( 'wp_ajax_avia_ajax_search', 'avia_ajax_search' ); add_action( 'wp_ajax_nopriv_avia_ajax_search', 'avia_ajax_search' ); function avia_ajax_search() { global $avia_config; $exclude_category_id = 340; // Replace with the actual category ID unset($_REQUEST['action']); if(empty($_REQUEST['s'])) $_REQUEST['s'] = array_shift(array_values($_REQUEST)); if(empty($_REQUEST['s'])) die(); $defaults = array('numberposts' => 5, 'post_type' => 'any', 'post_status' => 'publish', 'post_password' => '', 'suppress_filters' => false, 'results_hide_fields' => ''); $_REQUEST['s'] = apply_filters( 'get_search_query', $_REQUEST['s']); $search_parameters = array_merge($defaults, $_REQUEST); if ( $search_parameters['results_hide_fields'] !== '' ) { $search_parameters['results_hide_fields'] = explode(',', $_REQUEST['results_hide_fields']); } else { $search_parameters['results_hide_fields'] = array(); } $search_query = apply_filters('avf_ajax_search_query', http_build_query($search_parameters)); $query_function = apply_filters('avf_ajax_search_function', 'get_posts', $search_query, $search_parameters, $defaults); $posts = (($query_function == 'get_posts') || !function_exists($query_function)) ? get_posts($search_query) : $query_function($search_query, $search_parameters, $defaults); $search_messages = array( 'no_criteria_matched' => __("Sorry, no posts matched your criteria", 'avia_framework'), 'another_search_term' => __("Please try another search term", 'avia_framework'), 'time_format' => get_option('date_format'), 'all_results_query' => http_build_query($_REQUEST), 'all_results_link' => home_url('?' . http_build_query($_REQUEST)), 'view_all_results' => __('View all results','avia_framework') ); $search_messages = apply_filters('avf_ajax_search_messages', $search_messages, $search_query); if(empty($posts)) { $output = "<span class='av_ajax_search_entry ajax_not_found'>"; $output .= "<span class='av_ajax_search_image ".av_icon_string('info')."'>"; $output .= "</span>"; $output .= "<span class='av_ajax_search_content'>"; $output .= " <span class='av_ajax_search_title'>"; $output .= $search_messages['no_criteria_matched']; $output .= " </span>"; $output .= " <span class='ajax_search_excerpt'>"; $output .= $search_messages['another_search_term']; $output .= " </span>"; $output .= "</span>"; $output .= "</span>"; echo $output; die(); } //if we got posts resort them by post type $output = ""; $sorted = array(); $post_type_obj = array(); foreach($posts as $post) { $sorted[$post->post_type][] = $post; if(empty($post_type_obj[$post->post_type])) { $post_type_obj[$post->post_type] = get_post_type_object($post->post_type); } } //now we got everything we need to preapre the output foreach($sorted as $key => $post_type) { // check if post titles are in the hidden fields list if ( ! in_array('post_titles', $search_parameters['results_hide_fields'] ) ) { if(isset($post_type_obj[$key]->labels->name)) { $label = apply_filters('avf_ajax_search_label_names', $post_type_obj[$key]->labels->name); $output .= "<h4>".$label."</h4>"; } else { $output .= "<hr />"; } } foreach($post_type as $post) { $image = ""; $extra_class = ""; // Get the categories for the post $post_categories = wp_get_post_categories($post->ID); // Check if the excluded category is in the post categories if (!in_array($exclude_category_id, $post_categories)) { // check if image is in the hidden fields list if (!in_array('image', $search_parameters['results_hide_fields'])) { $image = get_the_post_thumbnail($post->ID, 'thumbnail'); $extra_class = $image ? "with_image" : ""; $post_type = $image ? "" : get_post_format($post->ID) != "" ? get_post_format($post->ID) : "standard"; $iconfont = $image ? "" : av_icon_string($post_type); } $excerpt = ""; // check if post meta fields are in the hidden fields list if ( ! in_array('meta', $search_parameters['results_hide_fields'] ) ) { if(!empty($post->post_excerpt)) { $excerpt = apply_filters( 'avf_ajax_search_excerpt', avia_backend_truncate($post->post_excerpt,70," ","...", true, '', true) ); } else { $excerpt = apply_filters( 'avf_ajax_search_no_excerpt', get_the_time( $search_messages['time_format'], $post->ID ), $post ); } } $link = apply_filters('av_custom_url', get_permalink($post->ID), $post); $output .= "<a class ='av_ajax_search_entry {$extra_class}' href='".$link."'>"; if ($image !== "" || $iconfont) { $output .= "<span class='av_ajax_search_image' {$iconfont}>"; $output .= $image; $output .= "</span>"; } $output .= "<span class='av_ajax_search_content'>"; $output .= " <span class='av_ajax_search_title'>"; $output .= get_the_title($post->ID); $output .= " </span>"; if ($excerpt !== '') { $output .= " <span class='ajax_search_excerpt'>"; $output .= $excerpt; $output .= " </span>"; } } $output .= "</span>"; $output .= "</a>"; } } $output .= "<a class='av_ajax_search_entry av_ajax_search_entry_view_all' href='".$search_messages['all_results_link']."'>".$search_messages['view_all_results']."</a>"; echo $output; die(); } }**Issue Description:**
I am encountering an issue with the Add Media button functionality in the Enfold theme on my WordPress website. The Add Media button is not working as expected on specific pages of the website, particularly when the website is in the Arabic language.
**Symptoms:**
– When I attempt to click the Add Media button on pages where I can input content (such as the text editor fields), nothing happens. The button is not clickable.
– This issue seems to be specific to the Arabic version of the website. On the English version of the website, the Add Media button functions as intended.**Steps Taken:**
I have done some troubleshooting to identify the cause of the issue:
– I have tested the website with the default WordPress theme, and the Add Media button works correctly.
– I have disabled all plugins, and the issue still persists, indicating that the problem is likely related to the theme itself.**Possible Cause:**
The issue seems to be related to a theme conflict or compatibility issue. It’s possible that there is a conflict with the Enfold theme or its settings that affects the functionality of the Add Media button on certain pages, especially when the website is in the Arabic language.
**Request for Assistance:**
I am seeking assistance to diagnose and resolve this issue. As the Add Media button is a crucial feature for content creation, I would greatly appreciate guidance on how to fix this problem. If there are any specific settings, code adjustments, or troubleshooting steps I should take, please let me know.
**The Custom Function:**
function show_media_button( $editor_settings, $field_object, $form, $entry ) {
// Get the current language code
$current_lang = get_locale();// Check if the current language is Arabic (locale code ‘ar’)
if ( $current_lang === ‘ar’ ) {
// If the language is Arabic, disable media buttons
$editor_settings[‘media_buttons’] = true;
} else {
// For all other languages, enable media buttons
$editor_settings[‘media_buttons’] = true;
}return $editor_settings;
}
add_filter( ‘gform_rich_text_editor_options’, ‘show_media_button’, 10, 4 );Thank you for your support.
I have a custom post type that has advanced custom fields involved. I’m using a plugin I created with a shortcode to display the loop. I’m not able to use the Layout Builder because of the advanced custom field and some complications of moving a site with 1800 posts from an old theme into Enfold.
I need to add pagination to the page (via the plugin presumably) and I’m not seeing a code snippet that would do that. Can anyone help with some code to add pagination?
On pages the layout sidebar is no longer showing even though it shows on posts. In addition, there is custom field section under the editor which is not showing on posts.
Hello together,
I’m looking for a solution to add the content of 3-5 advanced custom fields to a portfolio single.
Which theme file could I manipulate to reach a solution? Is it possible with the function.php or do I have to manipulate the portfolio-single?More Details:
I like to build portfolio items, which inserts by default content like: portfolio-title (page title), product-description (page short description), price_old from acf, price_new from acf and one image form acf. After that content the ALB-Content (additional masonry-gallery, video, table or something) should appear.It sounds easy, but I didn’t find a solution so far.
Regards
ChrisHi All, I have a client that would like to have a select field on the page using a custom template – allowing them to select the main menu to be displayed. I’m using Advanced Custom Fields plugin for the select field. I have created a page template based on the template-builder.php. The new template calls a custom header file (copy of header.php) that finally calls “helper-custom-menu” (instead of “helper-main-menu”). I think I found the area where I need to change the code to make this all work, but it surely does NOT work. Does anyone have any suggestions on what needs to be changed for this to work correctly? Here’s the code section I changed:
/* * display the main navigation menu * modify the output in your wordpress admin backend at appearance->menus */ if( $headerS['bottom_menu'] ) { $output .= '</div>'; $output .= '</div>'; if( ! empty( $headerS['header_menu_above'] ) ) { $avia_config['temp_logo_container'] = "<div class='av-section-bottom-logo header_color'>{$output}</div>"; $output = ''; } $output .= "<div id='header_main_alternate' class='container_wrap'>"; $output .= "<div class='container'>"; } $avia_theme_location = 'avia'; $avia_menu_class = $avia_theme_location . '-menu'; $select_menu = the_field( 'select_wp_menu' ) $main_nav = "<nav class='main_menu' data-selectname='" . __( 'Select a page', 'avia_framework' ) . "' " . avia_markup_helper( array( 'context' => 'nav', 'echo' => false ) ) . '>'; $args = array( 'theme_location' => $avia_theme_location, 'menu' => $select_menu, '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() ); $wp_main_nav = wp_nav_menu( $args ); $main_nav .= $wp_main_nav;Hello there,
we are using a download-plugin for tracking PDF downloads. In order to have a custom construct around the download field, we’ve added a shortcode which also echoes the download-shortcode coming from the plugin. This works like we’ve expected.
The problem occurs while using a customized column-shortcode from Enfold ALB.We have added a restriction within the columns (column.php), which allows the user to access specific parts of the page if you are the given “level”.
Within the shortcode handler function, I’ve added this:if($atts['group_visibility']) { if(is_user_logged_in()) { $term = get_term( $atts['group_visibility'], 'packages' )->term_id; $userid = get_current_user_id(); $userterms = wp_get_post_terms( $userid , 'packages', array( 'fields' => 'ids' ) ); if(!in_array($term,$userterms)) { $restricted = true; $restrictedClass = 'restricted-div'; $outputaddition = $this->displayRestrictionMessage('Not available for your package.',$deviceID,'package-restriction'); } } else { $restricted = true; $restrictedClass = 'restricted-div'; $outputaddition = $this->displayRestrictionMessage('You need to be logged in to see this information.',$deviceID,'logged-restriction'); } }This also works fine, later on we have this:
if(!$restricted) { //if the user uses the column shortcode without the layout builder make sure that paragraphs are applied to the text $content = ( empty( $avia_config['conditionals']['is_builder_template'] ) ) ? ShortcodeHelper::avia_apply_autop( ShortcodeHelper::avia_remove_autop( $content ) ) : ShortcodeHelper::avia_remove_autop( $content, true ); $output .= trim( $content ); } else { $output .= $outputaddition; }but this breaks the shortcode in the
The shortcode in the “page content” ALB template displays the calendar, but when restricted (hence echoing “outputaddition” instead of the content), the shortcode in the “page content” ALB template somehow displays a download-shortcode – which doesn’t make any sense.Do you have an Idea on how these changes can affect a shortcode on the page?
If you need any credentials, please let me know.
Regards
Hey There
I want to build a custom Table for my client and i have two Challenges:
1. The first field is still white, but it should be transparent.
2. I need a color-Code for the courses of this fitness studio
For Example: Dot/Circle-Icon in the fields. Each Course should have a different coloured Dot next to it.
Under the Table I will write an overview with a legend with more informations about the Course.2b: If its not possible to put an icon with a specific color in the Fields: can I also change the different field-colors?
I need some kind of Changing Colors for each course.Thank you!
This ist the Css:
`
/*Tabelle*/
.main_color table, .main_color table tbody, .main_color table tr, .main_color table td {
background-color: transparent !important;
border: 3px solid black!important;
}/* Alternate row color */
#top .avia-table tr:nth-child(even)
{ color: black !important;
}






