Categories
CMS Mastering Development Wordpress

How to prevent multiple post with same meta value being created simultaneously in WordPress (with ajax)

I’m trying to make my own appointment system for WordPress. For this, I created a post type called "appointments". When users select a service from the service list, the available dates and times are listed. When the available date and time are selected and the appointment is created, a meta key named "appointment_datetime" is added […]

Categories
CMS Mastering Development Wordpress

How to prevent multiple post with same meta value being created simultaneously in WordPress (with ajax)

I’m trying to make my own appointment system for WordPress. For this, I created a post type called "appointments". When users select a service from the service list, the available dates and times are listed. When the available date and time are selected and the appointment is created, a meta key named "appointment_datetime" is added […]

Categories
CMS Mastering Development Wordpress

How to prevent multiple post with same meta value being created simultaneously in WordPress (with ajax)

I’m trying to make my own appointment system for WordPress. For this, I created a post type called "appointments". When users select a service from the service list, the available dates and times are listed. When the available date and time are selected and the appointment is created, a meta key named "appointment_datetime" is added […]

Categories
CMS Mastering Development Wordpress

Custom query give me 404 when paginate

in my site I have "CPT Clients" and each client has "CPT Success Stories", also I have a list of client’s taxonomies, and when access to one of thees, I need to display the stories which client belongs to that taxonomy. My code looks like this: $query_obj = get_queried_object(); $args = array( ‘post_type’ => ‘sky-client’, […]

Categories
Mastering Development

How can you get Tabulator to use Select2 header filter?

Following the example here, we’ve been trying for over a week to get Tabulator working with a Select2 header filter. There is a JS Fiddle here with all the pieces. It seems like the Tabulator filter (which are really just editors) onRendered() function is not even getting called because the console log we have inside […]

Categories
CMS Mastering Development Wordpress

Display two items from a custom post type that have 2 different taxonomy terms but output different HTML in the loop for one of those terms

sorry if my question title does not make much sense, I couldn’t think of a good way of wording it. Essentially, I currently have some custom loop code on single.php that does the following: If a post_tag from the main article (post_type: post) contains a matching post_tag of a single item (game) in the custom […]

Categories
CMS Mastering Development Wordpress

Custom Woocommerce Product Query

I work on a project that shows some travels (depending on the destination category). I try to sort the travels on the start date (var_confirmed_date) but the result is the same as no sorting. Here is my query: `$args = array( ‘posts_per_page’ => -1, ‘post_type’ => ‘product’, ‘meta_value’ => ‘meta_value’, ‘meta_key’ => ‘var_confirmed_date’, ‘order’ => […]

Categories
CMS Mastering Development Wordpress

Custom Woocommerce Product Query

I work on a project that shows some travels (depending on the destination category). I try to sort the travels on the start date (var_confirmed_date) but the result is the same as no sorting. Here is my query: `$args = array( ‘posts_per_page’ => -1, ‘post_type’ => ‘product’, ‘meta_value’ => ‘meta_value’, ‘meta_key’ => ‘var_confirmed_date’, ‘order’ => […]

Categories
CMS Mastering Development Wordpress

How to get all post status

I need to modify this code to show all post status, not just published. Any idea? $post_types = get_post_types(array(‘public’=>true),’names’); $post_type = !empty($_REQUEST[‘type’]) && in_array($_REQUEST[‘type’], $post_types) ? $_REQUEST[‘type’]:get_option(‘wpfc_default_type’); $args[‘post_type’] = $post_type; $args[‘post_status’] = ‘publish’; // need modifi here? $args[‘posts_per_page’] = -1; if( $args[‘post_type’] == ‘attachment’ ) $args[‘post_status’] = ‘inherit’; $args[‘tax_query’] = array(); foreach( get_object_taxonomies($post_type) as $taxonomy_name […]

Categories
CMS Mastering Development Wordpress

How to exclude woocommerece product category in search results?

I’m looking for a way to exclude a product category from search results with Woocommerce using the pre_get_posts action and $query->set(). I am searching using the WordPress ?s=keyword search. I know that the function will begin like this: add_action(‘pre_get_posts’, ‘exclude_product_category’); function exclude_product_category( $query ) { global $wp_the_query; if ( ( ! is_admin() ) && ( […]