URLs for child terms
URLs for child terms
URLs for child terms
WordPress multiple custom post types capability conflict in a single menu
So the issue seemed to be with my second meta_query array – instead of checking if pub_date EXISTS, I decided to check if wpcf-date-time DOESNT EXIST: $today = date( ‘Y-m-d’ ); $args = array( ‘post_type’ => array(‘research_article’, ‘events’), ‘posts_per_page’ => 10, ‘post_status’ => ‘publish’, ‘orderby’ => ‘meta_value date’, ‘order’ => ‘DESC’, ‘meta_query’ => array( array( … Read more
Use the query_vars filter to add a new query variable to store the template version (minimal / complete). add_filter( ‘query_vars’, ‘se385568_query_vars’ ); function se385568_query_vars( $vars ) { $vars[] = ‘tpl’; return $vars; } Add a rewrite rule (codex) to recognize the new link format and set the newly created query variable add_action( ‘init’, ‘se385568_rewrite_rules’ ); … Read more
Add custom post type as submenu [closed]
In what form is vacancy_end_date stored in your database by ACF? Make sure you’re asking for the same form. I.e. date(‘Ymd’) produces 20200421 but your vacancy_end_date might be stored as unix stamp stamp, which would be a string like 1619028671 so you would never match it. I do not think you need the ‘meta_key’ => … Read more
Custom Taxonomy terms aren’t getting referenced or saved in Quick Edit or Bulk Edit, only on Single product page?
You don’t need a save_post hook. When you call wp_insert_post, it will return either a post ID or an error object. We can use this to then assign the category by taking categ from $result. I imagine it would looks similar to this: $post_id = wp_insert_post( $abstract_details ); if ( ! is_wp_error( $post_id ) ) … Read more
Hiding posts by other users and non-logged in
Help with Elementor Pagination CPT archive 404 problem