trying to create simple plugin to filter categories from all authors

Plugins run a lot earlier than themes – you need to delay the execution using a hook: /** * Fire once WordPress is ready and conditionally hook our handler. */ function wpse_199197_init() { $user = wp_get_current_user(); $allowed_roles = array( ‘author’ ); if ( array_intersect( $allowed_roles, $user->roles ) ) add_filter( ‘get_terms_args’, ‘wpse_77670_filterGetTermArgs’, 10, 2 ); } … Read more

Allow non-admin users to access plug-in

from Codex function add_theme_caps(){ global $pagenow; if ( ‘themes.php’ == $pagenow && isset( $_GET[‘activated’] ) ){ // Test if theme is activated // Theme is activated // gets the author role $role = get_role( ‘author’ ); // This only works, because it accesses the class instance. // would allow the author to edit others’ posts … Read more

How to markup wordpress site using Schema.org?

As anything related to the structure of the generated HTML this is a pure theme issue. There s unlikely to be any relevant plugin as you need to know the content in order to produce the relevant html markup. You might be able to find plugins to do some specific schema.org markup but that standard … Read more