• Hello, I would like to increase the width of the content area, but only for my “home” page. Even though I chose the full width option and the sidebar is gone for this page, the content area is still as small as before. Can someone give me instructions about which CSS code to put where. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter chayleen

    (@chayleen)

    My template currently looks like this:

    <?php
    /*
    * Template Name: Fullwidth Page
    */
    ?>

    <?php get_header(); ?>

    <div class=”row”>
    <div class=”col-md-8 col-md-offset-2″>
    <main id=”content” role=”main” itemprop=”mainContentOfPage”
    itemscope=”itemscope” itemtype=”https://schema.org/Blog”&gt;
    <div class=”row”>
    <div class=”col-md-12″>

    <?php while ( have_posts() ) : the_post(); ?>
    <article id=”entry-<?php the_ID(); ?>” <?php post_class( ‘entry’ ); ?> itemscope=”itemscope” itemtype=”https://schema.org/BlogPosting&#8221; itemprop=”blogPost”>
    <h2 class=”entry-title” itemprop=”headline”>
    <?php the_title(); ?>
    </h2>

    <?php if ( has_post_thumbnail() ) : ?>
    <div class=”entry-featured”>
    “>
    <?php the_post_thumbnail( ‘post-thumbnail’, array( ‘itemprop’ => ‘image’ ) ); ?>

    </div>
    <?php endif; ?>

    <div class=”entry-content”>
    <?php the_content(); ?>
    <?php wp_link_pages(); ?>
    </div>

    <div class=”entry-utils group”>
    <?php get_template_part( ‘part’, ‘social-sharing’ ); ?>
    </div>

    <?php comments_template(); ?>

    </article>
    <?php endwhile; ?>

    </div>
    </div>
    </main>
    </div>
    </div>

    <?php get_footer(); ?>

    Hi there chayleen!
    Can you please give me a link to your site, so I can inspect it to see what’s wrong? ??

    Thread Starter chayleen

    (@chayleen)

    Sure, it’s https://www.chayleen.com. If you are on the home page, you will see the slider and the text under, but is is not full width, but the width of a normal post which is just centered.

    Yeah, you are right. This template file isn’t full screen, but you can easily change that.

    Replace this code:

    <div class="row">
    <div class="col-md-8 col-md-offset-2">

    With this:

    <div class="row">
    <div class="col-md-12">

    That will make it full width. Remember that when you are modifying a template file you should always copy it into a child theme before changing anything. That way your changes aren’t being overwritten when you update your theme.

    I hope this help you out ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change content area width’ is closed to new replies.