I have a custom post type archive page but I also need the user to be able to insert a bit of page text. I thought I could just use the_content() of the page but the edit link is gone from the admin menu for custom post types archive pages.

Is this something new and is there any way to enable it?

admin bar

2 Answers
2

I’m not sure if I understand you correctly, but maybe this will help you.

If you’re on CPT archive, then there is no “Edit” link, because it’s archive and not a page… Archive is list of posts, so there is no single post to edit… Another example of archive page is when you’re viewing search results or all posts from given year – there is nothing to edit in these views.

What you can do/how would I do it?

You can add new page and set its slug to the same value as CPT slug…

Let’s say your CPT is ‘Book’ with slug ‘book’. You can add normal page called ‘Book’ with slug ‘book’.

CPT archive and single CPT has higher priority than single page in Rewrite Rules, so this page will be ignored by WP. But you can manually display it’s content in archive-book.php template…

Leave a Reply

Your email address will not be published. Required fields are marked *