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

Preserve indentation, HTML5 shorthand in editor

Sounds like you are using the wrong software 😉 wordpress is not really designed nor should it be used as an html editor. If for whatever reason you need some concrete HTML format you should either use a shortcode to generate it or create a page template to be used in the places where it … Read more

Permanently show Custom Fields in Editor

this should work but you overwrite the values for existing objects. to add default values only for new objects try that : $postType = “tender”; add_action( ‘save_post_’ . $postType, function ($post_ID, \WP_Post $tender, $update) { if (!$update) { // default value for new object // Add the meta data you want the custom post type … Read more

incorrect url in Snippet editor

I contacted the company DesignLynx which had the plugin saying do not deactivate, they knew the issue and fixed it by removing the root relative component of framework plugin and also removed the jQuery version override. thank you for the contributions in guiding me for the fix gordon

wp_editor embed shortcode not working within my plugin

The WordPress OEmbed should show in the editor by default. If it doesn’t, I suspect that you need to enqueue some scripts and styles on your page where you are using wp_editor. Eg: wp_enqueue_script(‘editor’, false, false, false, true); wp_enqueue_script(‘quicktags’, false, false, false, true); wp_enqueue_script(‘wplink’, false, false, false, true); wp_enqueue_script(‘wpdialogs-popup’, false, false, false, true); wp_enqueue_style(‘wp-jquery-ui-dialog’, false, … Read more

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