• Hello, I am using a 2013 child theme, but I can’t get a full-width template.

    I have tried various thing, and I am reporting here what seems to be the most suggested on forums – yet it didn’t work for me.

    I copied the page.php and renamed it FullWidth.php in the twentythirteen-child theme folder (I left also page.php).

    In full-width.php, I changed the first few lines and added the style=”100%” attribute:

    <?php
    /*
    Template Name: FullWidth
    */ 
    
    get_header(); ?>
    
    	<div id="primary" class="content-area" style="width:100%">
    		<div id="content" class="site-content" role="main" style="width:100%">
    
    			<?php /* The loop */ ?>
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    					<header class="entry-header">
    						<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
    						<div class="entry-thumbnail">
    							<?php the_post_thumbnail(); ?>
    						</div>
    						<?php endif; ?>
    
    						<h1 class="entry-title"><?php the_title(); ?></h1>
    					</header><!-- .entry-header -->
    
    					<div class="entry-content">
    						<?php the_content(); ?>
    						<?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
    					</div><!-- .entry-content -->
    
    					<footer class="entry-meta">
    						<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
    					</footer><!-- .entry-meta -->
    				</article><!-- #post -->
    
    				<?php comments_template(); ?>
    			<?php endwhile; ?>
    
    		</div><!-- #content -->
    	</div><!-- #primary -->
    
    <?php get_footer(); ?>

    Finally, I selcted the FullWidth template in the page options (quick edit –> template –> FullWidth)

    Any ideas why it is not working?

    https://guhu.website/?page_id=143

  • The topic ‘Full width pade for twenty thirteen theme’ is closed to new replies.