Support » Theme: Griffin » Making my blog posts central

  • Hello,

    How do I make my blog posts central? Not the text position but the whole box?

    Also the featured image?


Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi TheBardette.

    Your posts appear left aligned when all your sidebar widgets are removed. If you think you might use sidebar widgets with your posts, then you should try adding some, to see if that’s what you need.

    However, if you’re convinced that you will not be using a sidebar with your posts, then follow along below. Bear in mind that some of my advice will involve removing the sidebar widgets (only on posts). You can choose to leave them in, but they will be shifted below your main content.

    There are couple of steps involved in resolving your problem:

    1. Create a child theme
    2. Create a custom templates

    1. Create a child theme: To do this, install the Griffin theme as usual, then follow this guide to create a child theme. This will ensure that whenever the Griffin theme is updated, your changes will stay in place:

    How to Create a WordPress Child Theme (Video)

    Alternatively, you can use this plugin to create a child theme using a few clicks:

    Once that is all done, then:

    2. Create a custom templates: First, activate the child theme.
    Then, find the following files from the parent theme, and copy them across to the child theme:


    Open the single.php file into your child theme, go to round about line 3, and change this:

    <div class="col-md-8">

    to this:

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

    Then head to round about line 11, and comment out the widget sidebar, like so:

    <?php //get_sidebar(); ?>

    Save the file.

    Next open content.php in your child theme, go to round about line 3, and change this:

    <?php the_post_thumbnail('featured-full'); ?>

    to this:

    <?php the_post_thumbnail(''); ?>

    Save the file.

    Then reload your posts.

    You should see them as centralised now, including the featured image. Out of interest, I used a featured image sized at 1920px wide by 1200px high.

    Post back if you get stuck at any stage.

    Hope that helps.

    Great, thank you CJ.

    I have already made some edits to the HTML, will I lose those?


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Making my blog posts central’ is closed to new replies.