Support

Account

Forum Replies Created

  • Found it. I was using this code in my functions.php:

    		$showID = $wpdb->get_var( $wpdb->prepare( "
    			SELECT ID 
    			FROM $wpdb->posts 
    			WHERE post_name = %s 
    			AND post_type= %s", 'show', 'page' ) );
    			
    		if ( !$showID ) {
    			$showID = wp_insert_post( array(
    				'post_name' => 'show',
    				'post_title' => 'Show',
    				'post_type' => 'page',
    				'post_status' => 'publish'
    				));
    		}
    		wp_update_post( array(
    			'ID'           => $showID,
    			'post_status' => 'private'
    		) );
    

    Turns out the wp_update_post with just the ID and post_status makes this issue alive. Even though it has the correct ID to the page.

  • Did a fresh WordPress install, restored database and fresh installed ACF Pro. This issue still remains. Will now try with a fresh install and import of the custom post types

Viewing 2 posts - 1 through 2 (of 2 total)