• Resolved FVW

    (@fvw)


    Hello,

    I already tried to achieve this by researching on different forums, but I did not manage to find a solution; I hope someone of you can help me (and perhaps many others with the same question) ??

    I would like to generate a Full-Width-Template for the Twenty Thirteen Theme.
    Is there someone who could help me with the different codes (for the full-width-page.php the style.css and/or the functions.php if necessary)

    I was not able to locate the right sections which need to be changed in these files…

    Thank you very much!
    Best regards!
    Fabian

Viewing 10 replies - 16 through 25 (of 25 total)
  • Just tried something and it worked. At the footer class tag, I changed “entry-meta-full” to “entry-meta”, and that fixed the layout issue.

    Definately needed to comment out the get_sidebar

    @zulfikar: Thanks for the original post, which gave me a head start. However, the proposed solution does not retain the original font style of the page title, neither its vertical margin.

    For me, the following approach seems to work better for a full width page template…

    in child-theme’s style.css:

    ...
    .my-full-size {
    	margin-left: auto !important;
    	margin-right: auto !important;
    	height: auto;
    	padding-right: 1em !important;
    }

    And then, in my full-width-page.php file I just add the my-full-size class to the desired elements:

    ...
    <?php /* The loop */ ?>
    <?php while ( have_posts() ) : the_post(); ?>
    
    	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		<header class="entry-header my-full-size">
    			<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
    			<div class="entry-thumbnail">
    				<?php the_post_thumbnail(); ?>
    			</div>
    			<?php endif; ?>
    
    			<h1 class="entry-title my-full-size"><?php the_title(); ?></h1>
    		</header><!-- .entry-header -->
    
    		<div class="entry-content my-full-size">
    			<?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; ?>
    ...

    This also seems to behave closer to the original behavior of the theme, which centers the <article> elements, leaving plenty of room at both sides (although it leaves more room than the above css).

    I haven’t tested it extensively, but so far it seems to work fine.

    Zulfikar, I followed your instructions above to make that content area wider. It seems to have had an effect because the edit button within the content area that I see when I’m logged has moved outward significantly. The problem I’m experiencing is that the content still seems to remain within the original content area. If you care to see what I mean the link to the page is here.

    Any help would be appreciated!

    @larry, from what I can tell you haven’t disabled the sidebar from your full-width template file. Try removing (or commenting out) the line:

    <?php get_sidebar(); ?>

    from your custom template file.

    neomikenet

    (@neomikenet)

    Hi everybody,

    I’m under a 3.7.1 WP with the Twenty Thirteen theme.

    I’ve followed the whole procedure to modify my pages to full width, by creating a child theme.

    I’ve been able to activate my child theme but the modifications i’ve made in my new “full-width-page.php” aren’t visible on my website. Checking with Firebug, i’ve seen that it’s still the “page.php” which is used.

    I don’t know what i’ve missed! Can you help me ?!

    Thanks in advance,
    Mickael.

    neomikenet

    (@neomikenet)

    I’ve found a solution to my problem : i’ve used in my child theme the same name “page.php” and now i can see my modifications.

    I don’t know why it was not working whith the previous name.

    penguingirl1

    (@penguingirl1)

    Hello everyone,

    I’m really new at the editing through style.css but I am working with the twenty thirteen theme and I want to change the width of the content on every page to fill more of the page and have less margin space. I have tried following the instructions above using the custom style css plugin, but nothing changes on my site.

    Any advice is welcome… it could very well me something still I’m doing wrong, but I’ve tried a variety of things and can’t see any results. Please help! The site is https://igalapagos.org/

    Thanks very much!!!!

    WPyogi

    (@wpyogi)

    @penguingirl1 – please start a new thread – this one is marked resolved –

    https://codex.www.ads-software.com/Forum_Welcome#Where_To_Post

    kt22mike

    (@kt22mike)

    Neomikenet or other kind person:

    I have followed your directions but for some reason the edits i included in my twentythirteen-child is not taking effect. My website is capecodrailtrail.org

    Here is my style.css

    /*
     Theme Name:     Twenty Thirteen Child
     Theme URI:      https://example.com/twenty-thirteen-child/
     Description:    Twenty Thirteen Child Theme
     Author:         John Doe
     Author URI:     https://example.com
     Template:       twentythirteen
     Version:        1.0.0
    */
    
    @import url("../twentythirteen/style.css");
    
    /* =Theme customization starts here
    -------------------------------------------------------------- */
    .my-full-size {
    	margin-left: auto !important;
    	margin-right: auto !important;
    	height: auto;
    	padding-right: 1em !important;
    }

    Here is my full-width-page.php

    <?php
    /**
     * Template: full width
     *
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages and that other
     * 'pages' on your WordPress site will use a different template.
     *
     * @package WordPress
     * @subpackage Twenty_Thirteen
     * @since Twenty Thirteen 1.0
     */
    
    get_header(); ?>
    
    	<div id="primary" class="content-area">
    		<div id="content" class="site-content" role="main">
    
    			<?php /* The loop */ ?>
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    					<header class="entry-header my-full-size">
    						<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
    						<div class="entry-thumbnail">
    							<?php the_post_thumbnail(); ?>
    						</div>
    						<?php endif; ?>
    
    						<h1 class="entry-title my-full-size"><?php the_title(); ?></h1>
    					</header><!-- .entry-header -->
    
    					<div class="entry-content my-full-size">
    						<?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 -->

    I am using bluehost as my server and I know the child template works as I can activate it and see it running. Not sure what I am doing wrong – is there something I need to do once I open up a page to edit or create a new page? Any advice would be appreciated.

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘Full Width Page Template’ is closed to new replies.