How do I add a custom page layout?

Community Forums Forums General Discussion How do I add a custom page layout?

This topic is: not resolved

This topic contains 2 replies, has 3 voices, and was last updated by  braddalton 1 year ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31847

    hannab
    Participant
    Post count: 20

    I’d like to add a custom page layout to Executive. Where can I find instructions how to do this?


    If you’re not living on the edge, you’re taking up too much space.

    #31894

    Vajrasar Goswami
    Participant
    Post count: 156
    #31916

    braddalton
    Participant
    Post count: 7458

    You could also copy the page_landing.php template, rename it to page_custom.php, remove the remove actions and add your own.

    <?php
    /**
     * This file adds a custom page template to the Executive Child Theme.
     *
     * @author StudioPress
     * @package Generate
     * @subpackage Customizations
     */
    
    /*
    Template Name: Custom
    */
    
    // Add custom body class to the head
    add_filter( 'body_class', 'executive_add_body_class' );
    function executive_add_body_class( $classes ) {
       $classes[] = 'executive-custom';
       return $classes;
    }
    
    // Add custom code here
    
    genesis();
    

    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.