• hello,
    i have set up a static front page on my website but don’t want the latest comments coming up on the right hand side of the website. instead i want them to come up on all the other pages, and was wondering if this was possible.

    my website is http://www.essexandsouthendlink.org.uk, you can see how it is set up there. please note the static page is not set up there its only on my local machine at the moment, because i’m not going to put it up until it works properly.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Add this to your theme’s index.php:

    <?php
    if ( is_front_page() ) : get_sidebar('Sidebar 2');
    
    else : get_sidebar();
    
    endif;
    ?>

    Then, add the following to your theme’s functions.php:

    if ( function_exists('register_sidebar') )
        register_sidebar(array(
    		'name' => 'Sidebar 2',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    		'after_widget' => '</div> <!-- end .widget -->',
    		'before_title' => '<h3 class="widgettitle">',
    		'after_title' => '</h3>',
        ));

    Thread Starter 4techx

    (@4techx)

    thank you that works, but i didn’t expect to have the whole of the right hand of the screen empty! i will have to rethink my approach.

    but thank you again for your help.

    I forgot to mention that you now can add widgets to your “Sidebar 2” via Appearance > Widgets. That way, you have two different widget areas, one for your front page, and one for the rest.

    You may try using “Widget Logic” plugin from http://ww.wp.xz.cn/extend/plugins/widget-logic/

    Try using “!is_front_page()” as the logic for this particular widget (Recent comments) on the widget control admin page.

    S.K

    Thread Starter 4techx

    (@4techx)

    thanks for those tips, i am now able to configure my front page exactly how i wanted!

    hi there,

    my site has no sidebar and though i’ve removed the comments from all my other pages (referring to their id’s in my page file), my homepage still does because it does not have an id. how might i go about removing the comments area there?

    http://conjureinthecity.com

    thanks in advance!

    remove <?php comments_template(); ?> function from index.php file.

    thanks! but i’m such a novice – where do i find that?

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘disable comments static front page’ is closed to new replies.