Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.
  • I've created a custom post type.
  • I have set has_archive as true and understand I could also set it to has_archive => 'ctp'
  • I also know that if I name a template file archive-cpt.php Wordpress will use this template for my cpt.

This is okay for some situations. But I'd like my client to be able to go to an editing page, like default posts and pages in the admin area.

I have thought about making the archive-cpt.php a template that can be called in a default page. Making that page the archive.

Am I on the right track? I'd really like to do this with the most up to date WordPress method.

share|improve this question
    
Edit in what way? Edit like as in admin edit screen for the archive template? –  Brad Dalton Jan 7 at 16:02
    
Sorry i wasn't clear on what to edit. I would like to know the best way to create a custom archive page that my client can edit in the same way they can edit a normal post or page. For example, they would be able to use the editor panel and set a featured image. –  JohnLion Jan 7 at 21:33
    
Please post the code you used to create the CPT –  Brad Dalton Jan 7 at 22:12
    
An archive-cpt.php template won't give you a settings page for the archive which is what you want. –  Brad Dalton Jan 7 at 22:34
    
Thanks Brad here's a link the code I used to create my cpt github.com/John-Lion/Source/blob/master/custom_project_cpt I've since looked at; - Adding the text in a widget. - Using a theme options framework to add a settings page to the cpt menu. Which seemed like the way I'd like to go as it meant I was learning more about adding more functionality to wordpress for future clients. - Adding a new section to the wp customiser with text-area settings and controls. After finding out more about this, I like this route. Keeping to wp core as close as I can. What do you think? –  JohnLion Jan 8 at 23:16
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.