Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1271429

    Hi, Enfold Expert,

    I want to display footer widget only on homepage and want to remove it on all posts and other pages.
    And just below the Footer widget there is socket, you should not remove that on post pages, That should be active everywhere.
    site url: copybloggerthemes.com
    screenshot for understanding: https://prnt.sc/wkkamq

    Note: Please don’t give CSS, I want to remove the footer widget except socket using PHP…Css only hide it.
    There is no such option in enfold to display footer widget only on homepage, it should be done through PHP customization.
    Thanks and hope to see your reply.

    • This topic was modified 8 months, 1 week ago by  hamzakhankhan.
    #1271518

    Hi Hafeez Ullah,

    Please do the following (a child theme is required, if you don’t have one yet please download and follow instructions in https://kriesi.at/documentation/enfold/child-theme/ ):
    1. Copy enfold’s footer.php to the child theme.
    2. Modify footer.php (child theme) in line 115:

    if( in_array( $footer_widget_setting, array( 'all', 'nosocket' ) ) )

    to this code:

    if( in_array( $footer_widget_setting, array( 'all', 'nosocket' ) ) && is_front_page() )

    Let us know if it helps.

    Best regards,
    Nikko

    #1271696

    @nikko

    I don’t want to use child theme due to some reason, kindly give me piece of code to directly put in the function.php or give me any modification to do in the footer.php

    Its quite difficult for us to use the child theme, instead give me the direction solution

    #1271777

    Hi hamzakhankhan,

    You can skip the child theme part and just directly modify footer.php in the enfold theme line 115, from:

    if( in_array( $footer_widget_setting, array( 'all', 'nosocket' ) ) )

    to:

    if( in_array( $footer_widget_setting, array( 'all', 'nosocket' ) ) && is_front_page() )

    Since you’re not using a child theme, you’ll need to re-add this code every theme update.

    Best regards,
    Nikko

    #1273489

    Thanks It Worked for me

    #1273505

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

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

The topic ‘How to Remove Footer Widget on all Post & Pages?’ is closed to new replies.