• Resolved Olivier

    (@ocjanssen)


    Hi guys,

    I’ve been search for what seems like ages for the winning tutorial, but apparently I’m lacking the required keywords. Hope you can help me out!

    User stories for my custom WordPress theme:
    – Enable registered users to create & edit custom post types (“content”) through the frontend
    – Enable registered users who have created “content” to submit their content for admin review
    – Enable admins to approve “content in review” for publication
    – Publicly display approved content on a public archive

    How am I building the custom theme?
    – For scratch. Ideal solution doesn’t use plugins.

    What did I learn so far?
    – Processing frontend form submissions doesn’t seem to cover my case, as the content generated aren’t (?) necessarily linked to a user
    – Repurposing “draft” content as “private” seems not to work because I can’t force a review when switching from one to the other
    – .. not much else unfortunately

    Hope you guys can hook me up with some tutorials or high-level principles I need to dive into to solve this (ideally without a lot of custom code, as I’m not exactly an expert).

    Cheers!

    Olivier

Viewing 1 replies (of 1 total)
  • None of this functionality belongs in a theme.
    The things you want to do are all built-in to WordPress, except for the front end submission. You just have to use the user roles correctly (contributors, authors, editors, adninistators).
    There is already a plugin for front end editing (user has to be logged in and have the correct capability). But creating a new post would need some sort of button or link to create an empty post to edit. I’m sure there are plugins that do this already though.

    If you don’t want to use existing plugins, at least read the code to see how to do what you want. But write it as a plugin, not a theme. Themes are loaded after plugins, and don’t have the same activation hooks, which are needed for custom post types (flush rewrite on activation). And if the code is in the theme, you are locked in to using that theme. You can’t switch and you can’t independently deactivate things to determine a problem, without losing the functionality of everything.
    Separate plugins are best — especially for modularity.

Viewing 1 replies (of 1 total)
  • The topic ‘Theme dev: User generated content that’s private to the user that created it’ is closed to new replies.