Tagged: footer widget, socket
-
AuthorPosts
-
January 11, 2021 at 2:21 am #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/wkkamqNote: 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 3 years, 10 months ago by hamzakhankhan.
January 11, 2021 at 8:48 am #1271518Hi 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,
NikkoJanuary 11, 2021 at 9:13 pm #1271696I 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
January 12, 2021 at 8:56 am #1271777Hi 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,
NikkoJanuary 18, 2021 at 10:32 pm #1273489Thanks It Worked for me
January 18, 2021 at 11:44 pm #1273505Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘How to Remove Footer Widget on all Post & Pages?’ is closed to new replies.