Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Different Templates for different pages (not posts)

  • 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, etc

    I 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?

  • 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.