Metric Theme – Remove Footer Widgets

Community Forums Forums Design Tips and Tricks Metric Theme – Remove Footer Widgets

This topic is: not resolved

Tagged: , ,

This topic contains 4 replies, has 2 voices, and was last updated by  braddalton 1 year, 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #54594

    david.olsen
    Participant
    Post count: 5

    Hi,

    I”m working with the Metric theme. The client would like the footer widget section removed from the sub-pages (but left on the home page).

    How can I accomplish this?

    Thanks in advance,

    Dave

    http://corporatecoachingintl.com/wpi/
    #54841

    braddalton
    Participant
    Post count: 9779

    What do you mean by sub pages? Please link to one.

    This code removes the footer widgets from the 2nd and subsequent pages of posts split up in an archive:

    https://gist.github.com/braddalton/6183239


    #55141

    david.olsen
    Participant
    Post count: 5

    Thanks for the reply Brad!

    By subpage, I mean any page/post that’s not the home page – example:

    http://corporatecoachingintl.com/wpi/our-services/executive-coaching/

    Not sure what file I should add the code to. I tried adding it to the theme functions file (functions.php) in the metric folder but it didn’t change anything.

    Dave

    • This reply was modified 1 year, 1 month ago by  david.olsen.
    • This reply was modified 1 year, 1 month ago by  david.olsen.
    #55165

    braddalton
    Participant
    Post count: 9779

    Change this line:
    [php]
    if( is_paged() ) {
    [/php]

    To this:
    [php]
    if( !is_home() ) {
    [/php]


    #55170

    braddalton
    Participant
    Post count: 9779

    Yes. The code i embedded above and tested uses the conditional tag for removing the footer on sub pages of all archives.

    Once you change the conditionals, you’ll find the footer only displays on the home page.


Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.