• Hello, I’m installing a site for a local charity – and they really like a particular theme (‘clean home’). However, we would like only to have the sidebar widgets on the blog page. Is there a way of editing the .php files to do this neatly? Or perhaps a plugin for this purpose? I’ve searched but to no avail.

    Many thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Real easy. You want to edit your sidebar.php (in your theme, so /wp-content/themes/mytheme/sidebar.php) and put in a PHP check for if it’s the front page.

    Put this as the first line:
    <?php if ( is_front_page() ) { ?>

    and this as the last line:
    <?php } ?>

    Voila.

    I want to also exclude sidebars from my pages but don’t know where in my “r-sidebar.php ” to put the above code (because I have two sidebars but they appear as one on the right in View mode).

    If I paste in my code-or I can email it-can you help?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to exclude widgets from specific pages?’ is closed to new replies.