-
syoung
I have 2 types of pages on my site:
1. Location pages – a page for each location that my business operates in
2. Other pages – About Us, Our team, etcI want there to be a different block – content template for each type of page. Is there a way to set this up?
With posts it’s easy – I can create different categories for different types of posts. But how do I do the same with pages?
-
Fernando
Hi Syoung,
You can also enable categories and tags for Pages with a code.
Example:
function myplugin_settings() { // Add tag metabox to page register_taxonomy_for_object_type('post_tag', 'page'); // Add category metabox to page register_taxonomy_for_object_type('category', 'page'); } // Add to the admin_init hook of your theme functions.php file add_action( 'init', 'myplugin_settings' );
Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets
That should allow you to set the display rule as you prefer for pages.
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.