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 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: 9308

    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


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #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

    #55165

    braddalton
    Participant
    Post count: 9308

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

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


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #55170

    braddalton
    Participant
    Post count: 9308

    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.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

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

You must be logged in to reply to this topic.