How can I remove the editor from the ‘main posts page’?

WordPress already does this by default, so long as that page doesn’t have any existing content. Plus it adds a notice explaining why the editor isn’t there. These are the lines already in WordPress Core: if ( $post_ID == get_option( ‘page_for_posts’ ) && empty( $post->post_content ) ) { add_action( ‘edit_form_after_title’, ‘_wp_posts_page_notice’ ); remove_post_type_support( $post_type, ‘editor’ … Read more

Force category choice before creating new post

Use the ‘save_post’ hook to programmatically enteract with your new post when it is created, then use the wp_set_post_terms() function to assign your term, add_action(‘save_post’,’set_post_default_category’, 10,3); function set_post_default_category($post_id, $post, $update){ if($update) return; //only want to set if this is a new post! if(‘post’ !== $post->post_type) return; //only set for post_type = post! $term = get_term_by(‘slug’, … Read more

Custom page for editing custom post type on frontend based on url

You can add custom url structures with add_rewrite_rule for example the proposed structure in your question can be achieved with something like… add_action( ‘init’, function() { add_rewrite_rule( ‘^jobs/([^/]+)/edit/?$’, ‘index.php?post_type=jobs&name=$matches[1]’, ‘top’ ); } ); So now if you visited https://example.com/jobs/job-title-example/edit/ you should see exactly the same as if you were to visit https://example.com/jobs/job-title-example/ this is because … Read more

Live reload preview just reloads forever

This is from the Editorskit plugin, it is not a part of WordPress. If it’s broken you will need to contact their support routes. ( Based on finding the description text verbatim in a github search, resulting in a file in the preview extension of editorskit )

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)