Show Specific Footer Widget for Specific Pages

I registered a new footer widget with this code.

‘name’ => esc_html__( ‘Footer Sidebarprestige’, ‘realtor’ ),
‘id’ => ‘footer-sidebarprestige’,
‘description’ => esc_html__( ‘Widgets in this area will be shown in Footer Area.’, ‘realtor’ ),
‘before_widget’=>'<li id=”%1$s” class=”col-md-3 col-sm-6 widget %2$s”>’,
‘before_title’ => ‘<h5>’,
‘after_title’ => ‘</h5>’

I called it in my footer.php file like this:

<ul class=”row”>

<?php dynamic_sidebar(‘footer-sidebar’); ?>


<ul class=”row”>

<?php dynamic_sidebar(‘footer-sidebarprestige’); ?>


The ‘footer-sidebar’ is original widget and the ‘footer-sidebarprestige’ is the one I added. The way it is now if I add a widget to the widget area I added it shows up under the original one and I understand why.

What I am trying to do. Call the widget area that I added only for certain page ID’s. Basically, only on called page ID’s show newly created footer widget and not show the original widget area.

Read more here:: Show Specific Footer Widget for Specific Pages

Leave a Reply

Your email address will not be published. Required fields are marked *