Add a user to edit the layout of a site

We may need a little more information on the version of WordPress you are running, or at least the interface you are seeing that the new admin is not seeing. Typically, when I troubleshoot WordPress installations and I have to add an administrator, I have full access just like an admin. So, it shouldn’t be … Read more

Unable to add options on dashboard widget ?

$args[‘before_widget’] and $args[‘afters_widget’] (or after_widget) are things you’d add to a front-end sidebar widget. They have no relevance to dashboard widgets. The call to $args[‘before_widget’] is likely throwing an error because it’s not set. Also, your wp_dashboard_setup hook callback is an anonymous function. This won’t work on PHP < 5.3. So double check your PHP … Read more

What Role to assign remote site developer?

“Developer” implies that he will have access to the code – in which case he has carte blanche to do whatever he likes. If you actually mean he just has access to the site admin – and I assume this is multisite as you mentioned being a Super Admin – then a site Admin cannot … Read more

Exclude Everywhere but Admin Area?

Note that there’s no is_admin() method for the WP_Query class. But the interesting part is that PHP will not complain about this: $query->is_admin() where $query is an instance of WP_Query. It will just always return false. This is the reason why (#src): /** * Make private/protected methods readable for backwards compatibility. * * @since 4.0.0 … Read more

Query comments with non-empty ‘author_url’ value on Admin Comments Screen

We can set the author_url argument of WP_Comment_Query as null (empty string will not work) to search for comments that don’t have an author url. Currently (ver 4.8.1) the has_author_url isn’t supported. Using a sub-query to exclude those comments, with no author_url, using comment__not_in, should work, but wouldn’t probably scale well. Setting fields as ids … Read more

Mixed language in admin backend

Ok I resolved the problem. It turns out I have mistakenly copied the .po files (fr_FR) of my theme into the /language folder and not /language/themes, so WordPress was picking the .po of my theme and not the one from wordpress. I moved the po file to the themes folder and hit refresh on my … Read more

How to enforce authentication for all resources?

You should define which resources you want to protect. I think you have such choices: 1) Protect whole site 2) Protect only posts (without resources) 3) Protect posts & all resources (but only uploads, not wp-content! otherwise you will break your themes/plugins) So, as you say you need 3rd way. In such case, you should … Read more