Support » Theme: Poseidon » use full width template for custom post types

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter echobrin

    (@echobrin)

    I figured this out — hope it helps someone.

    1. Copy single.php to your child theme
    2. Rename it single-wpdmpro.php
    3. Add fullwidth-content-area class
    4. Remove the line that calls the sidebar.

    Here’s the code.

    <?php
    /**
     * The template for displaying all single posts.
     *
     * @package Poseidon
     */
    
    get_header(); ?>
    
    	<section id="primary" class="fullwidth-content-area content-area">
    
    		<main id="main" class="site-main" role="main">
    				
    		<?php while ( have_posts() ) : the_post();
    
    			get_template_part( 'template-parts/content', 'single' );
    
    			poseidon_related_posts();
    
    			comments_template();
    
    		endwhile; ?>
    		
    		</main><!-- #main -->
    	</section><!-- #primary -->
    	
    
    <?php get_footer(); ?>
    
    Thread Starter echobrin

    (@echobrin)

    Forgot to mention – replace wpdmpro with the name of your custom post type (example is for WordPress Download Manager).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘use full width template for custom post types’ is closed to new replies.