Multiple AJAX handler functions conflict in functions.php

The use of $_POST[‘action’] in the WP_Query and as a dynamic action name is dangerous, and in the code triggers the handler on all AJAX requests even those you don’t want. This is unavoidable and a dead end that cannot be fixed. Alternatives are mandatory. Instead, use a static non-dynamic action name, E.g. mathieu_loadmode_post_archive or … Read more

How to search order using database frontend short code WordPress

Use the below code it may help you and sure that your sql query is correct then it will be work properly. function wpb_demo_shortcode() { global $wpdb; $results = $wpdb->get_results( $wpdb->prepare(“SELECT DISTINCT o.order_id, o.`order_item_name`, om.`meta_value` as ‘bcs’, (select pm.`meta_value` from `wp_postmeta` as pm WHERE o.order_item_id = om.order_item_id AND pm.`post_id` = o.order_id AND pm.`meta_key` = ‘2-certificate’) … Read more

How to display 8 posts in four columns and 2 rows on a carousel slide?

Its very difficult to understand from the HTML code example what you are trying to achieve but going by the php you could do the following. <?php $posts = new WP_Query([ ‘post_type’ => ‘services’, ‘posts_per_page’ => -1, ‘order’ => ‘ASC’ ]); if ($posts->have_posts()) : ?> <ul class=”slider-container”> <?php $loop_position = 1; while ($posts->have_posts()) { $posts->the_post(); … Read more