Jump to content


Photo
- - - - -

Changing footer


This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1 Jackey

Jackey

    Advocate

  • Members


  • 685 posts

Posted 30 November 2009 - 08:41 AM

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.

#2 arpowers

arpowers

    Founder

  • Administrators
  • 3270 posts

Posted 30 November 2009 - 04:41 PM

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.

#3 Jackey

Jackey

    Advocate

  • Members


  • 685 posts

Posted 30 November 2009 - 09:43 PM

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.

#4 arpowers

arpowers

    Founder

  • Administrators
  • 3270 posts

Posted 30 November 2009 - 11:51 PM

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"

#5 Jackey

Jackey

    Advocate

  • Members


  • 685 posts

Posted 01 December 2009 - 08:53 AM

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

#6 arpowers

arpowers

    Founder

  • Administrators
  • 3270 posts

Posted 01 December 2009 - 08:48 PM

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