1

In the pages editor Wordpress now displays " - Home Page", and " - Posts Page" next to the respective pages.

If I go to edit Posts page a notice reads:

You are currently editing the page that shows your latest posts.

If I add a custom post type with an archive template is there a way I can recreate this behaviour for the custom posts?

e.g. Suppose I have "videos" as a custom post type.

I'd like a page "Videos" in the pages section, that in edit mode displays:

You are currently editing the page that shows your latest videos.

1 Answer 1

0

That logic related to home/front page in core is a horrific mess and very special snowflake. You absolutely don't want to repurpose any of that.

It wouldn't be that hard to build what you want in custom site:

  1. Have your videos page designated somehow (easiest way is by slug, but be careful of slug getting changed, clients like to mess with those)
  2. Detect the page by your criteria in editor and display notice you want
  3. In your archive template retrieve the page by your criteria and use its ID to retrieve and display content as needed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.