How to add CSS to WordPress

These are some helpful threads on wordpress.org: https://wordpress.org/support/topic/hovering-settings/ https://wordpress.org/support/theme/twentytwentythree/ You can use the hidden customizer option to add your CSS. Append customize.php to your site admin URL. E.g. https://example.com/wp-admin/customize.php And add your custom CSS in the Additional CSS section and this should do the trick.

Disappearing plugins

Figured it out… I had Admin Menu Editor Pro installed, and I forgot it has the ability to hide plugins, which I had apparently done at some point and forgot about. D’Oh!

Load a specific post if user tries to access 404 page

This is the final code that works. I had to set $wp_query->is_single = true; manually: add_action( ‘template_redirect’, function(){ global $wp_query; if ( is_404() ){ $id = 1; // the post corresponding to hello-world if ( $id ) { $wp_query->is_404 = false; status_header(200); header(“HTTP/1.1 200 OK”); $wp_query->query(“page_id=$id&post_type=post”); $wp_query->the_post(); $wp_query->is_single = true; } } }, 999);

When do we use wp_slash?

Correct, if you are duplicating a post in WordPress, you do not need to use wp_slash() to escape the data. The purpose of wp_slash() is to add slashes to the data to prepare it for storage in the database. When you are duplicating a post, you are not directly inserting or updating data in the … Read more

register_activation_hook doesn’t execute without add_action(‘init’,’some-function’)

The register_activation_hook() function takes two parameters: the first parameter is the path to the main plugin file, and the second parameter is the name of the function to be executed when the plugin is activated. In your case, you are passing the plugin directory path to the register_activation_hook() function instead of the path to the … Read more