When your website means business.

Snippets: CPT

CPT to CPT Reverse Query»

Reverse query from different post types associated via ACF relationship field.
ACF, CPT, WP Query | Type: PHP

Disable Gutenberg for selected Custom Post Types»

function my_disable_gutenberg( $current_status, $post_type ) { // Disabled post types $disabled_post_types = array( 'book', 'movie' ); // Change $can_edit to false for any post types in the disabled post types…
CPT, PHP, WP/CP | Type: PHP

Eliminate Caching on Specific Page Templates and Post Types»

Put in your theme’s header.php file: <?php   if (is_page_template('page_eventslist.php')) {     //conditional, if desired     header('Cache-Control: no-cache, no-store, must-revalidate');     header('Pragma: no-cache');     header('Expires: 0'); } ?>
CPT, WP/CP | Type: PHP

Multiple Templates for Custom Post Type»

Number of possible solutions; have not tested any of them yet. Maybe trying to make this too complicated: what about serving different template parts based on user type? Added Multiple…
CPT, WP/CP | Type: PHP

Menu
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept
Cookies Notice