I made a custom post type called 'education'. I have added several pages to it. When it was first created I could go to http://example.com/education/ and see the posts, but I wanted to edit the layout. So I created a page called 'education' with the same permalink. Now it does not display any content.

Why does WordPress do this? How can I edit the layout if I can't create a page to attach a template?

1 Answer 1


The WordPress template hierarchy is your friend. https://developer.wordpress.org/themes/basics/template-hierarchy/

This provides a very detailed flow for how WP determines which template to load.

If you are ever uncertain about which template is loading, this little function is handy. Paste in your theme's functions.php and it will display the template used at the bottom of the page.

add_action('wp_footer', 'wpse_show_template');

function wpse_show_template() {
  global $template;

That being said, creating a page with the same slug (education) as your post type archive will produce unexpected results, as you've seen.

The proper way to add your static content to the Education archive is via the archive-education.php template.

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.