Add Columns to Admin CPT Listing»
See David Lord site for implementation.
ACF, CPT, Custom Admin | Type: PHP
Adding a Label to the Main Editor for Custom Post Types»
When a CPT relies on a lot of custom fields via ACF, the unlabeled main editor can be confusing (“What’s this for?”). This code goes in the theme’s functions file,…
ACF, CPT, Custom Admin, PHP | Type: PHP
CPT to CPT Reverse Query»
Reverse query from different post types associated via ACF relationship field.
ACF, CPT, WP Query | Type: PHP
Create sub posts for a WordPress custom post type»
This has to do with creating hierarchical CPTs, so you can have ‘sub-posts’ as children of a CPT single.
CPT, WP/CP | 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
Register Custom Post Types and Taxonomies»
Example shows how to register a CPT and taxonomies.
CPT, Taxonomy | Type: PHP
Upload folders for Custom Post Types»
Create a folder within wp-content/uploads that will contain uploads for each custom post type.
CPT, PHP, WP/CP | Type: PHP