• Hello,

    I am using Exquisite theme. I want to remove right sidebar, and center the content. I imagine I have to edit the stylesheet or something, but I don’t know how to go about it.

    I want to do it only for the single.php (posts).

    My website: ocimastudenta.cz

    Thanks in advance ??

    style.css
    [3000 lines of code redacted]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter kolbjan

    (@kolbjan)

    and single.php:

    <?php get_header(); ?>
    <div class="row">
    <section class="nine columns main-container">
      <?php if (have_posts()) :  while (have_posts()) : the_post(); ?>
      	<article <?php post_class('post'); ?> id="post-<?php the_ID(); ?>">
    
    		  <?php
    		    // The following determines what the post format is and shows the correct file accordingly
    		    $format = get_post_format();
    		    if ($format) {
    		    get_template_part( 'inc/postformats/'.$format );
    		    } else {
    		    get_template_part( 'inc/postformats/standard' );
    		    }
    		  ?>
    		  <div class="post-title">
    		  	<aside><?php echo thb_DisplaySingleCategory(true); ?></aside>
    		  	<h1><?php the_title(); ?></h1>
    		  </div>
    		  <aside class="post-meta">
    		  	<ul>
    		  		<li><?php _e( 'By', THB_THEME_NAME ); ?> <strong><?php the_author_posts_link(); ?></strong></li>
    		  		<li>&bull;  &nbsp; <?php echo get_the_date('j. F Y'); ?></li>
    		  	</ul>
    		  </aside>
    		  <div class="post-content">
    		  	<?php get_template_part( 'inc/postformats/post-meta' ); ?>
    		  	<?php the_content(); ?>
    		  	<?php if ( is_single()) { wp_link_pages(); } ?>
    		  </div>
    
      	</article>
      <?php endwhile; ?>
      	<?php get_template_part( 'inc/postformats/post-review' ); ?>
      <?php else : ?>
        <p><?php _e( 'Please add posts from your WordPress admin page.', THB_THEME_NAME ); ?></p>
      <?php endif; ?>
      	<?php get_template_part( 'inc/postformats/post-prevnext' ); ?>
      	<?php get_template_part( 'inc/postformats/post-related' ); ?>
      	<?php get_template_part( 'inc/postformats/post-endbox' ); ?>
      	<!-- Start #comments -->
      	<section id="comments" class="cf">
      	  <?php comments_template('', true ); ?>
      	</section>
      	<!-- End #comments -->
    </section>
      <?php get_sidebar('single'); ?>
    </div>
    <?php get_footer(); ?>

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You should contact your theme author about this: https://themeforest.net/user/fuelthemes

    Thread Starter kolbjan

    (@kolbjan)

    Thank you, but they don’t solve custom theme edits, they only help with bugs etc..

    Remove this from the single.php:
    <?php get_sidebar('single'); ?>

    To get rid of the sidebar.

    Thread Starter kolbjan

    (@kolbjan)

    Thank you, but it only removes the sidebar..

    It doesnt center the content.

    change this line:

    <section class="nine columns main-container">

    to:

    <section class="twelve columns main-container">

    Thread Starter kolbjan

    (@kolbjan)

    Awesome! Thank you very much..

    Is there also a way to keep the width as it was?

    Is there also a way to keep the width as it was?

    reverse the CSS class edit in single.php, i.e. change back to the original .nine;

    then add something like this to the styles of your theme, ideally via a custom CSS plugin:

    .single .nine { float: none; margin-left: auto; margin-right: auto; }

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘remove right sidebar and center the content’ is closed to new replies.