Archived

This topic is now archived and is closed to further replies.

Changing footer

6 posts in this topic

Posted · Report post

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

Posted · Report post

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

Posted · Report post

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

Posted · Report post

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

Posted · Report post

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

Posted · Report post

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