No sidebar on main blog page

Tagged: 

  • No sidebar on main blog page
    Viewing 5 posts - 1 through 5 (of 5 total)

  • leojez
    Participant
    #5542

    Hello,

    I have used your template for the blog with sidebar to create my blog section.

    The sidebar showed until in Settings –> Reading I set the following:

    – Static page
    – Front page: Home
    – Posts page: Blog

    Then the sidebar disappears. If I change Post page back to “Select” the sidebar comes back.

    On the blog page itself I have selected right-sidebar and the correct sidebar.

    Incidentally, the posts actually show the sidebar.

    Any ideas on getting the sidebar to show on the main page?

    Thanks!


    Omar
    Keymaster
    #5585

    Hello Leojez,

    Setting the blog page to be a template is different from setting the Posts Page
    the blog template calls the file circleflip/templates/template-blog.php
    while the Posts Page calls the circleflip/index.php

    There is a rather dirty option to add the sidebar to the index.php page
    change the line
    <section class="span12">
    to be
    <section class="span9">
    and add after the line
    </section><!-- #primary -->
    the following
    <aside class="span3">
    <?php dynamic_sidebar( 'blog' ); ?>
    </aside>

    where ‘blog’ is the sidebar name

    Cheers


    leojez
    Participant
    #5650

    Thanks Omar!

    That is almost perfect. There seems to be some padding missing which I can’t seem to figure out. As you can see, the main blog page now has the sidebar:

    http://eslteenstuff.com/news/

    but it isn’t padded like the individual blog pages:

    http://eslteenstuff.com/esl-teenstuff-coming-soon/

    How can I fix this please?


    Omar
    Keymaster
    #5764

    Hello Leojez,

    Sorry for the untimely response,
    and sorry for the miss on that padding

    in the code you edited before, make the last bit like
    <section class="span3">
    <aside class="sidebar right">
    <?php dynamic_sidebar( 'blog' ); ?>
    </aside>
    </section>

    Cheers


    leojez
    Participant
    #5797

    Thanks Omar, worked perfectly!

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘No sidebar on main blog page’ is closed to new replies.