Support » Plugin: WP-Members Membership Plugin » Restricting Custom Post Types

  • Hi,

    I’m trying to restrict access by default to some custom post types but they don’t appear on the options page. I use the plugin CPT UI to create thhis secific custom post type and I on’t see them on the settings page.

    To test it furthermore, I created another custom post type with Toolset Types and this one does appear in WP-Members options: does it mean I must switch from CPT UI to Toolset Types or did I miss something while creating the custom post type in the first place?

    Thanks for your input!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Ok, I found a solution, which I post here for those who would be looking for it: if your custom post type is not recognized/seen by WP-Members, you can add a custom field at the bottom of each custom post type:
    Custom Field: block
    Value: true

    The content of your custom post type won’t be publicly displayed then (which is why you want to block it in the first place 🙂

    Plugin Author Chad Butler

    (@cbutlerjr)

    You’re on the right track. However, “block” is a deprecated post meta (as is “unblock”). Use the meta key “_wpmem_block” instead. The values should be as follows:

    0 – unblocked
    1 – blocked
    2 – hidden

    Hi,

    Thank you for your reply. I tried to insert _wpmem_block as the name of the custom field and either 1 or 2 as values mais it didn’t work: I actually got an error message “you’re not authorized to do that”.

    Perhaps I misunderstood your reply and was doing something wrong, like the _wpmem_block is not a custom field and should be used elsewhere.

    I’d be grateful if you could provide me with a bit more information. Thanks for your time!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Restricting Custom Post Types’ is closed to new replies.