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 🙂
Related Posts:
- remove “Edit” from select pages
- Is there a way to stop WP editor deleting
- How to build a post and comment editing form in a page?
- How to disable Page Attributes dropdown in wp-admin
- User capability of create page/new page
- Trying to Edit a Page but it sends me to a Product Edit page
- Restricting Pages based on Hierarchy and User Role
- Cannot enter “::before” for li tag when editing a WordPress page
- Disable ADD PDF media button on rich text editor
- How can I edit pages from my local environment?
- After creating a new page, filling the page with structure
- Restrict specific private page to a specific user
- Not allow add New Page for role ‘editor’
- Add role and edit page capabilities
- Default pages to be unpublished – possible?
- Get page id by template
- How can I keep the content of my pages version controlled?
- How do I convert a page’s title to lower case?
- How do I set and list page_template with wpcli?
- How to get post or page excerpt using post_excerpt
- Different fields in My Profile page depending on user role
- Object gets unwanted width and height
- Automatically set page order on create page
- What’s the most minimal way in which a page can be hooked into WP?
- Associate Page with User
- Page with page template not using template in Preview
- Subpages return 404 error [closed]
- wordpress with many custom styled static pages
- Limit the number of pages created by the paging
- How to re-order pages en-masse
- A function like is_page() but returns true if on any sub page of given page
- How to get the excerpt of a page before more tag?
- how to get specific page content
- Using page slug in array
- Shortcode produces blank page
- How to create a page that contains a list of post titles from specific categories?
- Creating a 3-column layout on a WordPress Page
- Create page that is not deletable
- I have index.php and other files, how do I display other pages?
- Multiple TinyMCE Editors in one Admin Page
- Location-Based Pages displaying results near customer
- Blank Pages with # URL & Google
- Created php page in wordpress – Error Page can not be reached
- How to add pagination to a single wordpress page with lot of text
- Multiple alias for single page
- Removing Parent Page URL While Keeping the Navigation Intact
- Organizing Your Pages
- IF user is logged in only show certain page
- No Appearance panel is shown
- How to have a separate page? What should be the link to that page?
- Post Fetching Ignoring Sort_Column?
- loading a javascript on a WP PAGE
- WordPress theme: Add page content to the bottom of the Contact form
- When will body has class “page-id-0”
- How can I change “page” (as in foobar.com/page/5) to another word?
- determine whether content is of type Page or a Post and display accordingly
- Check if the child page has sibling pages, and bookmark current page
- pre-existing data, and entities
- How do I evaluate a get_posts array with is_page?
- Undefined index: post in NOTICE while adding meta box
- Displaying posts on homepage – Template Page
- is_single(); Question
- How to make title for home to be News, but if page has parent then its name else just post/page name
- Next Page & Previous Page links – skipping a single page – how?
- advanced paging in wordpress
- How do you set the default page in WordPress?
- How to use the full page
- anchor tag in header not working on other pages except the home page
- Using WP just to edit pages of an existing site
- $page = get_page_by_title CONTAINS
- Exclude child pages args array
- Set parent page based on custom metabox value
- Add string to page title if post in specific category
- How do I disable the built-in editor and automatically configure the properties of new pages?
- URL redirect to home page issue in word press site
- How to sorted Parent Page in WP-admin
- how can i display children of my parent page in one of the children page (wordpress)
- How to include a query_vars value in document_title_parts?
- Deleted WordPress page appears in Google Search Results
- WordPress redirects to login page when I enter url.com/index.php
- WordPress Page All Content In Template Good Or Bad Convention?
- Send e-mail from admin area to adresses in custom field
- Displaying Content Only in Certain Page IDs Not Working
- WordPress white screen with “All Pages”
- How to exclude sidebar from pages?
- Annoying notification when trying to create a new page
- Page stuttering on load
- How To List Sibling Pages And Include The Featured Image?
- WP Template Hierarchy – Need help choosing the correct templates
- the_content() Returns post content when I want page content
- how bbPress and buddypress add their own page templates to the page template drop down on the page editing screen
- Can’t select a page using is_page()
- If searched in a category show different 404 page
- How can I cycle posts with a #next and #previous script?
- Using Page/Post Slug In Link / URL
- Does WordPress list all pages for crawlers?
- How to display child page from specific parent page in homepage?
- How to display text of a page in home or custom page?
- Fresh WordPress installation not able to simply show page content