Title: Custom Posts Management
Last modified: October 11, 2017

---

# Custom Posts Management

 *  Resolved [Raja Mohammed](https://wordpress.org/support/users/cthreelabs/)
 * (@cthreelabs)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/custom-posts-management/)
 * I have been developing a theme with some complexity , to make things easier i
   have tried to split certain sections as custom post , but now i have ended up
   with too many custom post types. The site is for a university and it should showcase
   the list of courses the courses section have at least 15 – 20 pages , so i have
   decided to split each course as custom post so as to reduce the complexity in
   editing files . say there is 7 courses and each course has 15 – 20 pages . and
   there will be more courses added. i request the suggestion from experts how effectively
   the site can be managed.
 * Note : Apart from the course post typse there are more than 5 post types , like
   testimonial , faq, events, slider etc..
    -  This topic was modified 8 years, 7 months ago by [Raja Mohammed](https://wordpress.org/support/users/cthreelabs/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Achyuth Ajoy](https://wordpress.org/support/users/achyuthajoy/)
 * (@achyuthajoy)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/custom-posts-management/#post-9577433)
 * Hi Raja,
    You say there is around 15-20 pages per custom post. How are you managing
   the data now? Using ACF?
 * Good day!
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/custom-posts-management/#post-9581469)
 * It sounds to me like you should be using the hierarchical page structure to manage
   sections instead of custom post types. The default posts are not hierarchical,
   but the default pages are. If you don’t want to use page post types, create a
   single CPT for courses. Each course could be a top level post and all sections
   are children of this post. How these are displayed can be managed in theme templates.
   For example, any request for a top level course post will list a table of contents
   linking to each child section. Each child section would display just like any
   other single post.
 * Hopefully you don’t have too much data yet that needs to be restructured. If 
   there is a lot, some custom one time scripts can be developed to alter the data
   schema.
 *  Thread Starter [Raja Mohammed](https://wordpress.org/support/users/cthreelabs/)
 * (@cthreelabs)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/custom-posts-management/#post-9582842)
 * There is also a catch here we need to give each course management to a particular
   coordinator so a custom user management with specific access to the course content
   should be give . with hierarchical page structure is it possible to achieve a
   better user management.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/custom-posts-management/#post-9584212)
 * Yes, but it’s a bit outside the normal WP user management. By default, a CPT 
   can require unique roles and capabilities in order to interact with it. But all
   users with such roles can interact with any particular post type. Individual 
   posts are not tied to specific users by default, but that can be made to happen
   with some custom work.
 * The admin post list tables use the same WP_Query class to populate the tables
   as the front end uses to display posts. You can alter what posts the query returns
   through the “pre_get_posts” action. A specific user could be assigned to each
   post in post meta (custom fields). The admin queries can then be altered to require
   that the only posts returned have the current user listed in post meta.
 * That alone will achieve the usability you desire, but it’s not secure from clever
   nefarious users. Someone who has the basic edit role for the CPT could construct
   an URL that opens the edit screen for a post where they are not the designated
   manager of that post. They have bypassed the WP_Query criteria. Additional hooks
   are needed to protect from this sort of attack.
 * It may be that all users who can edit their CPT are trusted enough to not attempt
   editing others posts even if it’s possible. A properly constrained user interface
   is all that’s needed. If so, maybe additional security is not warranted. If desired,
   security could be added to prevent the wrong user from saving any edits by hooking
   into one of the save posts hooks that fire before the post is updated.
 * It’s more difficult to prevent the edit screen from even loading for the wrong
   person using a crafted URL, but it’s possible. An early save posts hook is much
   easier. I don’t feel bad for a nefarious user who crafts an edit screen URL, 
   then makes a bunch of changes they shouldn’t, only to find they cannot save their
   changes 🙂
 *  Thread Starter [Raja Mohammed](https://wordpress.org/support/users/cthreelabs/)
 * (@cthreelabs)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/custom-posts-management/#post-9587053)
 * [@bcworkz](https://wordpress.org/support/users/bcworkz/) Thanks , we have conclude
   to use heirarchial pages for the CPT.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Custom Posts Management’ is closed to new replies.

## Tags

 * [custom posts](https://wordpress.org/support/topic-tag/custom-posts/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 5 replies
 * 3 participants
 * Last reply from: [Raja Mohammed](https://wordpress.org/support/users/cthreelabs/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/custom-posts-management/#post-9587053)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
