Removing add new pages form editor role

Ok so few things.. there’s a pretty well coded plugin that handles user roles and permissions: https://wordpress.org/plugins/user-role-editor/ If you’d like to do this programatically though, you should: <?php function wpcodex_set_capabilities(){ global $wp_roles; // global class wp-includes/capabilities.php $role=”editor”; $cap = ‘publish_pages’; $wp_roles->remove_cap( $role, $cap ); } add_action( ‘init’, ‘wpcodex_set_capabilities’ ); ?> Lmk if that does it … Read more

Cannot update page – with too many characters?

I think it’s not the wp-config.php or .htaccess file you need to edit. The problem is web server related. search for php.ini file in your web server directory and there are some specific limits you may need to configure. like following keywords: upload_max_size’ , ’64M’ post_max_size’, ’64M’ max_execution_time’, ‘300’ I hope it helps and feel … Read more

Multiple meta_key with get_pages

I’m not sure if you can do it with get_pages(), but you should be able to do something like this with get_posts(): $args = array( ‘post_type’ => ‘page’, ‘meta_query’ => array( ‘template_clause’ => array( ‘key’ => ‘_wp_page_template’, ‘value’ => ‘unit.php’, ‘compare’ => ‘=’, ), ‘status_clause’ => array( ‘key’ => ‘status’, ‘compare’ => ‘EXISTS’, ), ‘relation’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)