Add checkbox in admin post list – show checked post in widget

To get you started: <?php /* Plugin Name: The Checkbox Plugin Plugin URI: https://www.yourawesomedomain.de/plugins/ Description: A plugin with a checkbox to mark posts. Version: 0.0.1 Author: bjovaar Author URI: https://www.bjovaar.maybe/ License: GPL2 License URI: https://www.bjovaar.de/disclaimer Text Domain: bjovaar Domain Path: /languages */ if(!defined(‘ABSPATH’)) { exit(‘No access’); } // This path variable can be used for … Read more

Move position in post list for a custom checkbox column

Quoting from https://www.isitwp.com/change-wordpress-admin-post-columns-order/ All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin: add_filter(‘manage_posts_columns’, ‘column_order’); function column_order($columns) { $n_columns = array(); $move=”author”; // what to move $before=”title”; // move before this foreach($columns as $key => $value) { if ($key==$before){ $n_columns[$move] = $move; } $n_columns[$key] = $value; … Read more

How can I restore posts from ‘trash’ with their previous post_status? – WordPress

The reason it is a draft, and what you need to do to get what you wanted is spelt out in the source code for wp_untrash_post and in the documentation for wp_untrash_post_status: https://github.com/WordPress/WordPress/blob/bbf017e550b02f5d11e409b07e689d45c984054d/wp-includes/post.php#L3668-L3685 $new_status = ( ‘attachment’ === $post->post_type ) ? ‘inherit’ : ‘draft’; /** * Filters the status that a post gets assigned when … Read more

Different background colors for posts with WordPress

If the site uses the Block Editor, support is already built in. Add a Group block first, and set its background color. You can then add blocks inside the Group block and set their text colors. You can define a specific palette for your theme so there are set colors, or you can let WordPress … Read more