Hot answers tagged

3

Did you try just using option.php? <form method="post" action="options.php">


3

Expanding my earlier comment into a more detailed answer: In regards to your decision not to use WP_Query, pre_get_posts is actually an excellent choice to make, rather than creating a new instance of WP_Query. In fact, pre_get_posts is exactly what you should be using when you want to change the main query. Rather than executing a separate query on each ...


2

the first request don't show any custom post type (polylang_mo is a custom post type) polylang_mo is a private custom post type so unless I explicitly request this post type, it won't be included. the second request shows only 1 page (instead of 3) Polylang was actually filtering the results. Adding --skip-plugins=polylang makes the 3 posts ...


1

Use 'supports' => [ 'title', 'editor', 'thumbnail' ] – different values, not keys. If we look into register_post_type(), we find these lines: if ( ! empty( $args->supports ) ) { add_post_type_support( $post_type, $args->supports ); unset( $args->supports ); } elseif ( false !== $args->supports ) { // Add default features ...


1

It's nothing to do with the class itself - you are using the reserved input name post, which is conflicting with WordPress core: <input type="checkbox" name="post[]" value="%s" /> Change it something unique to your theme/plugin e.g. name="my_plugin_ids[]"



Only top voted, non community-wiki answers of a minimum length are eligible