/wp-admin/ works but website doesn’t load

The solution that worked for me was to update WordPress to the latest version. I tried deleting the theme and to run the website, it didn’t work. It’s very awkward how the website crashed down and I was surprised that updating WordPress actually solved the problem. Thanks, to everyone who tried to help!

Retrieving Author ID in wp-admin area

It can be done like this without having to rely on the $post global. if ( is_admin() ) { if( isset( $_GET[‘post’] ) && isset( $_GET[‘action’] ) && $_GET[‘action’] === ‘edit’ ) { $post_id = $_GET[‘post’]; $current_post = get_post($post_id); $author_id = $current_post->post_author; } } The query string variable post is always the post_id you are … Read more

Unable to uncheck checkbox with jquery in wp admin

Can you please clarify your question? Are you attempting to make a checkbox that can clear all checkboxes and also recheck all checkboxes by checking that one checkbox? Also a checked input would be written like this: <input id=”editor-post-taxonomies-hierarchical-term-48″ class=”editor-post-taxonomies__hierarchical-terms-input” type=”checkbox” checked value=”48″ /> You can do this: $(‘div[aria-label=”Asukohad”] input[type=”checkbox”]’).on(“change”, function() { var element = … Read more

Remove All in One Pack from the admin bar

You are almost there! If you check out where the plugin developer is adding this action, you’ll see they are setting a priority of 1000. While the priority of your function is being called at 999. https://plugins.trac.wordpress.org/browser/all-in-one-seo-pack/trunk/aioseop_class.php#L3907 Update your priority to be greater than 1000: add_action( ‘admin_bar_menu’, ‘aldous_remove_items_from_admin_bar’, 1200 ); Overriding function calls with plugins … Read more

How to avoid manage posts screen duplicates when two plugins use the same library

In your code, you add the filter like this: add_action( ‘restrict_manage_posts’, array( $this, ‘restrict_log_posts’ ) ); Which adds a function that starts like this: public function restrict_log_posts() { $type=”wp_log”; $taxonomy = ‘wp_log_type’; // only add filter to post type you want if ( isset( $_GET[‘post_type’] ) && esc_attr( $_GET[‘post_type’] ) === $type ) { // … Read more