Mandarke
Member
Posted 2 years ago #
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!
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.
covenantguy
Member
Posted 2 years ago #
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?