Question regarding custom post type and needing to add a private yes/no toggle to admin page.

I have created a custom post type called broker-view. I have added my own custom login and have used the page creation function of the custom post type in the admin to create all my pages for the app.

Pages Created:








I am using the Session to store the login data. Once logged in I want to make the reports available. I am well versed in writing php code and pretty familiar with wordpress.

So my question is how do I add a yes/no toggle to the edit page of the brokerview post type that is simply for distinguishing the pages that require login. Obviously I can code it for every single page but would like a cleaner approach where all I have to do is select yes/no and this creates the desired behavior. Again I am a custom login and table to store only brokers.


  • Michelle Shull
    • DEV MAN’s Apprentice

    Hey there, Jeff!

    I am so sorry to say this is completely over my head, I’m 111% sure you are 5x the coder I am. (I threw in the numbers to look smarter.) : )

    When I come across these questions, I’m supposed to offer plugin solutions, which I’ll do, but I’m pretty sure you don’t need a plugin, just a guide. It’s Saturday, and most of our dev team and second level support team aren’t here, so you’re temporarily stuck with me.

    Plugin recommendation: We’ve got Protected Content, which would do exactly what you need. It has an addon for protecting Custom Post Types that works like a dream. Since you’ve rebuilt how registration, logging in, and account management work, however, I’m not sure it would be a seamless integration.

    Let me tag this for second level, but with the disclaimer that right now wait times for second level support are really long. It’s one guy, and he’s juggling a lot right now, including a new baby.

    Thanks for your question! This sounds like an impressive piece of WordPressSmithery you’ve put together!

  • Jeff
    • Flash Drive

    I have not touch the inner working of wordpress. I added a login separate from the internal working of wordpress for simplicity purposes. The wordpress users and the broker users are different and trying to merge all of this is a bit more complicated that I wish to pursue. I tried to use the custom post types plugin but it broke my theme (green lantern) which creates custom post types inside the theme for slides, etc…

    I guess looking at the protected content plugin may help on the programming side. It amazes me how complicated simple task become in wordpress and how many people use it. It is the old beta vs vhs debate. WordPress is inferior code to several other project but everybody uses it. Off the soap box and onto real concerns. Prior when I was a member there use to be live support for advance topics. This seems like it does not exist anymore. Is there a reason why and what is the plan to provide this support in the future, if any?

  • Michelle Shull
    • DEV MAN’s Apprentice

    Hi there, Jeff!

    We didn’t have a lot of demand for advanced topic chats, but you’re more than welcome to join one of the Intro or Design chats with your questions. If the chat host isn’t able to help directly, they may be able to point you to a workable solution for the issues want to address.

    Hope this helps, Jeff!

  • Hoang Ngo
    • Code Slayer

    Hi @jeff,

    I hope you are well today.

    From what I understand, so you want to add a check code, wherever people go to your custom post type, they will need to require to do a login?, and if not, we need to redirect them to your login page?

    Please advise,


    Best regards,

    Hoang Ngo

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.