• Hello,

    I do a lot of development for corporate CMS stuff and hence use a lot of Custom post types. Some times though it makes sense to use pages, because well, it is a page, and I don’t have many other pages of that other templates.

    So basically shouldn’t there be a custom page type or something where you could add meta boxes to specific-pages and enable/disable certain aspect of the backend UI of a page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I think you have to set a custom page design like custom post in wordpress. if is this your question about?. then here is the answers.

    Create custom page desgin as you want and add below mentioned lines in the same at top of the of the page. set “page name” as you want. thats it.

    <?php
    /*
    Template Name: Page Name
    */
    ?>

    Now, you uploaded this custom page php, just upload it to your theme folder and go and add New page, you can see “Templates” in that new page page. there you can choose your custome template for this perticular page.

    Hope it will help you surely…

    [sig moderated as per the Forum Rules]

    Thread Starter deane034

    (@deane034)

    Sorry a little late. No mate, that’s not the question. I was thinking there should be a page-version of custom post types. Like Custom-Page-types where for a certain page, I could enable/disable the main content editor, assign particular meta boxes, etc.

    I think the latter can be achieved by the Advanced custom fields plugin.

    If my understanding is correct, a page is just another ‘post-type’ but a heirarchical one.

    So, all you need to do is to set up a new ‘custom-post-type’ and within your code for registering the post type make sure to set;

    ‘hierarchical’ => true,
    ‘supports’ => array(‘title’,’editor’,’page-attributes’)

    I think those options will make it behave like a page within the edit screen

    Can anyone confirm if thats correct?
    Someone please correct me if I’m wrong.

    Thanks
    Stef

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