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

set transient for wp_query and refresh it after 25 minutes

As I have a auto feed website and I decide to use transient for improving website loading So I have a wp_query and I want to use transient for this query and expire it after 25 minutes <ul> <?php $portfolio = new WP_Query(array( ‘post_status’ =>’publish’, ‘post_type’ =>’post’, ‘fields’ => ‘ids’, ‘cat’ =>”.$link1.”, ‘posts_per_page’ =>’9′ )); […]

Categories
CMS Mastering Development Wordpress

WordPress pagination problem on merged queries

I have merged queries in search.php with custom post types. This is my scenario when user search to "math", the main query is searching in the post title, post excerpt, and post content. Now I have a "math" category but the post information is not including "math" text which exists in the math category so […]

Categories
CMS Mastering Development Wordpress

How to update/add child posts meta whenever the parent post meta is updated?

I couldn’t find a solution to a very simple problem. When a meta value for the parent post is updated, I want the meta value of all child posts linked to this parent post to be updated. For example: I want the “red” meta value to be automatically selected for the child posts when the […]

Categories
CMS Mastering Development Wordpress

Custom WP_Query not acknowledging search category & tag at the same time, but work independently

I have elaborate search functionality on one of my sites, it is using a custom WP_Query that will allow for an ‘AND’ & ‘OR’ relation between the users selections. It will then generate the result and overwrite the existing products in the product list. This is all being done using AJAX and a function within […]

Categories
CMS Development Wordpress

Query posts ordering by title, but ignore ” chars

I use following function to get my custom posts ordering by title $posts = get_posts( array( “orderby”=> “title”, “order” => “ASC”, “post_type” => “my-custom-post-type”, “posts_per_page” => -1, “fields” => “ids”, “meta_query” => array( array( “key” => “ams_park_id”, “value” => get_the_ID(), ) ) ) ); And it orders by title, the problem is that i have […]

Categories
CMS Development Wordpress

Weird orderby => post__in issue

I seem to have run into a sort of odd issue with WP_Query post__in I can’t quite figure out. ANY help is appreciated! Goal/Progress so far: Overall I want to merge two arrays and use the merged array inside a WP_Query. I currently have two get_posts queries, one has 5 posts (can be any number), […]

Categories
CMS Development Wordpress

Move to trash custom post type post after ACF Date Picker date is older than today

I have a custom post type called ‘aktualitates’ and I have a date picker field on the posts from the Advanced Custom Fields plugin with the field name ‘aktuali_expire’. I tried adding a code from another question to functions.php, but it doesn’t seem to work for me. I am positive, that the time values are […]