Jump to content
Sign in to follow this  
Jackey

Changing footer

Recommended Posts

Jackey

Hi, Just to make sure: If I would change line 4 of the footer.php from:

<?php if(pagelines('bottom_sidebars')):?>
to:
<?php if(pagelines('bottom_sidebars') && !get_post_meta($post->ID, 'bottom_sidebars', true)):?>

To give me the option to switch off the bottom sidebar, I would do no harm now would I.

Share this post


Link to post
Share on other sites
Andrew

nope.. that would work just fine. If you have a custom_field called 'bottom_sidebars' that is set to 'on' your bottom sidebars won't show.

Share this post


Link to post
Share on other sites
Jackey

I put it to off, and then they are gone ;-) But I think I can set it to anything I want, and then it is gone. I have to remove the custom field to restore it. Or should I use the quotes... Maybe that is why I have so much problems with switching widgets on and off.

Share this post


Link to post
Share on other sites
Andrew

the statement you're using says: "if a custom field called "bottom_field" doesn't exists, or is explicitly set to false... show the bottom sidebars"

Share this post


Link to post
Share on other sites
Jackey

O.K... better make that:

<?php if(pagelines('bottom_sidebars') && !get_post_meta($post->ID, 'hide_bottom_sidebars', true)):?>

then... So then when 'hide_bottom_sidebars' exists and does not have the value 0 the bottom sidebar shows. I will have to buy myself a book about this PHP stuff. Are there any constant names I can enter in the custom field instead of 0? I updated my profile on this forum to match the website I'm running with iBlogPro now... so check out! Thanks

Share this post


Link to post
Share on other sites
Andrew
I will have to buy myself a book about this PHP stuff. Are there any constant names I can enter in the custom field instead of 0?
I think 'off' works in WP.
I updated my profile on this forum to match the website I'm running with iBlogPro now... so check out!
Great add it to the showcase thread :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×