Hello, i need a little help at the moment on my website www.motorbikecentral.com i have a facebook like box in the right hand side and I only want that to show up on the home page then disappear on all other pages and posts. is someone able to help me with this? my php knowledge is crap and my wordpress knowledge is also pretty bad. so if you can make it pretty simple as im still learning how to get around the code in wordpress! Any help will be appreciated Thanks Kurt
open the admin pane and create new side bar and put that facebook code over there. Then you will find one code line. Copy that and open the sidebar.php file. now, here you needs to be write the PHP condition and with the copy code.
I like the honesty about the state of your knowledge, Kurt! Want you want to do is use a conditional tag (if...then...), as addlinkurl has rightly pointed out.
Use this: <?php if( is_home() ) : ?> code goes here <?php endif; ?> http://codex.wordpress.org/Function_Reference/is_home
You could try putting it in a <div> and then in your css file saying .page-id-xxx { display: none;} for each other page. But this may be not the most straightforward way to do it.
First remove the same from widget area to prevent it from showing everywhere , then edit index.php in your theme directory , type echo do_shortcode('short_code_of_your_plugin');