Sortable column (by numbers) in admin users

Is there something that I’m missing Yes, you need to actually add the function which will do the sorting based on your usercoins “sort by” value (that you set in your yoursite_manage_users_custom_column_sortable() function). So you would hook your function on users_list_table_query_args, then change the args so that the users are being sorted by the usercoins … Read more

How to add Extra Column of post Status in All post page

The last function doesn’t work. Use this instead to fill the status column: // Add the data to the post columns: add_action( ‘manage_post_posts_custom_column’ , ‘custom_post_column’, 10, 2 ); function custom_post_column( $column, $post_id ) { if ( $column == “status” ) { echo get_post_status($post_id); } }

Broken wordpress site, non-working links and no access to wp-admin page

https://wordpress.stackexchange.com/ is the stackexchange website that deals with wordpress. It seems like your website is hosted by Automattic so you can get their help by communicating with their support staff. Go to https://wordpress.com/support/contact/ and click on “I need customer service for a paid site hosted at wordpress.com“ https://wordpress.com/support/com-vs-org/ WordPress is a free and open-source Content … Read more

How to Restrict Access to all wp-admin pages for subscriber users

Hence, I want to block access of subscribers to all wp-admin menus/plugin pages including this link https://mywebsite.com/wp-admin/user-edit.php?user_id=113 This isn’t a bulletproof solution, but it should work in that non-admin users would no longer be able to access any admin pages when they’re logged-in: add_action( ‘admin_init’, function () { if ( wp_doing_ajax() || ! is_user_logged_in() ) … Read more

add_submenu_page() issue

edit.php?post_type=weather isn’t a valid PHP function name. If you’re trying to set the menu up as a submenu of your custom post screens, I think edit.php?post_type=weather—the $parent_slug—should be the first parameter, not the last. ie, add_submenu_page( ‘edit.php?post_type=weather’, ‘Weather Information’, ‘Weathers’, ‘manage_options’, ‘weathers’, [$this, ‘weathers’] ); References add_submenu_page()