From form submission values – dynamically update CPT “has_archive” slug and custom taxonomy “rewrite” slug value
From form submission values – dynamically update CPT “has_archive” slug and custom taxonomy “rewrite” slug value
From form submission values – dynamically update CPT “has_archive” slug and custom taxonomy “rewrite” slug value
Create settings page to enable or disable CPT
How to I add count of custom posts listed in a post as a prefix to its title
Fatal Error WordPress Custom Post Type UI + WPML
Of course, you can use conditions like this inside the loop. if ( ‘event’ == get_post_type( get_the_ID() ) ) { // do something } Full code would be // The Loop if ( $query->have_posts() ) : ?> <?php if ( is_home() && ! is_front_page() ) : ?> <header> <h1 class=”page-title screen-reader-text”><?php single_post_title(); ?></h1> </header> <?php … Read more
I got that working 🙂 add_filter(‘rest_myRoute_query’, function($args, $request) { $fields = array(‘myCustomField’); foreach ($fields as $field) { if (! empty($request[$field])) { $args[‘meta_query’][] = array( ‘key’ => $field, ‘value’ => esc_sql($request[$field]), ); } } return $args; }, 10, 2);
CPT Archive Pagination – Page not found
How to debug a 404 error on pages whose content is perfectly displayed when I explore it?
Trying to set up a range filter for related custom post types
Yes, you’ll want to create custom metaboxes for those. This is a pretty good intro into how to do that. But you might want to think through a few things: Are you sure you want that added to ALL posts? If not, perhaps create a custom post type and attach those fields to that post … Read more