Custom Posts on homepage

Try this, should work: function add_my_post_types_to_query( $query ) { if ( ( is_home() || is_front_page() ) && $query->is_main_query() ) { $query->set( ‘post_type’, array( ‘post’, ‘post_review_key’ ) ); } } add_action( ‘pre_get_posts’, ‘add_my_post_types_to_query’ );

re-register custom post type with custom capabilities

Have you tried something like this: ‘description’ => __( ‘This is where you can add new Connectors’ ), ‘public’ => true, ‘show_ui’ => true, ‘capability_type’ => ‘page’, ‘publicly_queryable’ => true, ‘exclude_from_search’ => false, ‘hierarchical’ => true, ‘capabilities’ => array( ‘publish_posts’ => ‘update_core’, ‘edit_others_posts’ => ‘update_core’, ‘delete_posts’ => ‘update_core’, ‘delete_others_posts’ => ‘update_core’, ‘read_private_posts’ => ‘update_core’, ‘edit_post’ … Read more

Custom Postype specific changes in admin panel

A filter always needs to return something. So in the second example you should try return $title; after the if statement so it doesn’t break other posts. add_filter( ‘sanitize_title’, ‘my_custome_slug’ ); function my_custome_slug( $title ) { return ( ‘customposttype’ === $GLOBALS[‘post’]->post_type ) ? str_replace( ‘*’, ‘-‘, $title ) : $title; } I’m not completely sure … Read more