New answers tagged

0

I was getting the same thing, tried everything from reinstalling WP, resetting my .htaccess and doing things that only made things worse. Turns out it I should have done was clear out my own Cookies And Cache. Problem fixed.


0

The Autoresize plugin is already built into WordPress with the name "wpautoresize". The wpautoresize plugin adds the following TinyMCE editor commands: editor.execCommand('wpAutoResizeOn') .. enable autoresize editor.execCommand('wpAutoResizeOff') .. disable autoresize editor.execCommand('wpAutoResize') .. resize the editor to fit the contents (e....


2

A "user admin screen" (or interface page) is a page in wp-admin for managing users. An "admin screen" (or interface page) is any page in wp-admin, which includes user admin screens but also screens for managing other types of data.


0

You can achive this by doing a redirect and passing along query arguments with the filter redirect_post_location. There is also redirect_term_location which will work for taxonomies/terms. First add the admin_notices action which will always be active, but will only show the notice under certain conditions. add_action( 'admin_notices', 'general_admin_notice' ...


0

I managed to solve this. Reason was that: The data about user roles, that's set by default in a WordPress installation was completely missing in the db table wp_options under the wp_user_roles row. In my case it was this a:3:{s:14:"backwpup_admin";a:2:{s:4:"name";s:14:"BackWPup Admin";s:12:"capabilities";a:12:{s:4:&...


2

Because there is no wp-admin.php file in WordPress: You shouldn't be able to login via wp-admin.php, it should not exist! Be extremely suspicious of this file, you may have been hacked, and have likely leaked your details to an attacker.


0

You can deactivate all plugins via the DB - you'll probably have phpMyAdmin or something from your hosting provider. Look for a field called active_plugins and turn that to NULL. If you still have problems logging in then you will at least know it's an infrastructure issue. Try /wp-admin/ and /wp-login.php check that's where the 404 actually is and you aren'...


1

This is something that a lot of membership plugins can do, e.g. MemberPress, Restrict Content Pro, or similar membership or user group plugins. Which is best for you depends on your particular setup. From what you're describing, you only need basic membership/group functionality (without features like payments), so I'd suggest going with a basic, free plugin ...


0

This might possibly be an issue with the URLs listed in the Settings under General. (If they don't match the URLs you're trying to use to get into Wp-Admin, then that can cause problems.)


0

I have a plugin called "WPS hide login" which changes the name of the login page. Could that be the problem? Deactivate this plugin before you do anything else. It's unlikely that the issue is with htaccess, especially if you deleted it and nothing changed. You might need to look if there is another htaccess file in the wp-admin folder.


1

<br> tags are not the solution to the problem that you were hoping they would be. Menu labels were never intended to contain arbitrary HTML. HTML does slip through in places, but this appears to be a bug and is inconsistent. For Post Types No. You can't. $menu[ $ptype_menu_position ] = array( esc_attr( $ptype_obj->labels->menu_name ), $...


1

When you display All Users, it will display values from users table. You will not see Nickname column, because Nickname value is in usermeta table. Put the following code to your child theme's functions.php file. First filter manage_users_columns will add custom column Nickname to All Users view. Second filter manage_users_custom_column will retrieve values ...


1

When I create custom plugins I tend to add a single init function, which includes other plugin files, attached functions from these files to actions and hooks, etc. This way I have centralized place where the plugin is bootstrapped. This init function is then hooked to the plugins_loaded action in case I need to do some dependecy checking - i.e. some other ...


0

If your interested in optimization, you can try one of the many optimization plugins that minify and defer scripts. I particularly like "Asset Cleanup" because you can disable/remove unnecessary plugin scripts on specific pages (i.e. CF7 on the home page, or any Woocommerce plugin on non Woocommerce pages)


0

is_user_logged_in() Would do it. So let's assume you're loading scripts only when the user is logged in, you can write: function load_user_scripts(){ if ( is_user_logged_in() ) { wp_enqueue_script( , , string[] $deps = array(), string|bool|null $ver = false, bool $in_footer = false ); }} And call it in functions.php add_action( '...


0

Just revisited that answer as it wasn't updated in a long time. Year is 2021. The accepted answer is checking whether the current page is a wp-login.php page OR an admin page WHILE using an admin_init hook, this is nonsense. admin_init fires as an admin screen or script is being initialized. this does not just run on user-facing admin screens. It runs on ...


0

Based on Carlos response (thank you very much) I wanted to add a little thumbnail image, but not a featured one, one from custom metabox. So this is what I added: add_admin_column(__('Thumbnail'), 'obraz', function($post_id){ $image_id = get_post_meta( $post_id , 'custom_thumbnail_metabox' , true ); echo '<img src="'.wp_get_attachment_image_url($...


Top 50 recent answers are included