Registering a page within a custom theme

Hello everyone,

I’m creating a theme that has several ‘fixed’ pages, that will never change and are not dynamic what so ever.

For example, I create an about.html page and I want it, as soon as the theme gets installed, that the page is registered as a new page within ‘pages’ in WordPress.

Is this best done using register_post_type?

I’m a bit confused here.

EDIT: I think I’m missing a point here. Should I create a Custom Post Type and then create a page template for it?

thanks for your help

Hi @24degrees I think this might be of help to you and what you are trying to achieve Custom Page Templates in Pinegrow WP

This might also be of help

This also has great information relating to creating page templates for Wordpress from the Wordpress Theme Developer Handbook and is well worth a read, I should probably have posted this first as the others are Pinegrow based but still valid information.

And one last one for good measure just in case you don’t have enough reading with these. This one is very helpful as it gives examples of situations where you might use a custom page for a specific and also how to do it (including screenshots).

From Smashing Magazine
A Detailed Guide To WordPress Custom Page Templates


You’re me (WordPress-)hero. Thanks, this helped a lot !!

It’s all about using custom post types instead of pages and, never forget, rebuild the permalink structure.

Now I get:

Thanks !!!

1 Like