 
	
		
		
		
		
			
- 
		AuthorPosts
- 
		
			
				
February 10, 2021 at 2:14 am #1279281hello, 
 this function code found @ https://kriesi.at/support/topic/possible-to-create-widget-area-above-footer
 works great. but is there a way to have it like this on every page EXCEPT the homepage?
 thanks!add_action('ava_before_footer','avia_above_footer'); function avia_above_footer(){ dynamic_sidebar( 'CustomWidgetName' ); }February 10, 2021 at 4:05 am #1279291…and even better, if i can exclude any particular page based on the page ID number. that way i can exclude the home page as well as any other that i may want to. 
 thanks!February 11, 2021 at 1:20 am #1279633well, for lack of a better option, i used the page-specific ID’s in my custom CSS to hide what i’ve injected on every page from the homepage… body.page-id-3662 .myclassname { display: none; }if this isn’t an appropriate way to do all this, please let me know. otherwise, it seems to be working well. February 11, 2021 at 11:39 am #1279713Hi, You can try something like this, if you want to exclude some pages: add_action('ava_before_footer','avia_above_footer'); function avia_above_footer(){ if (! is_page(array( '42', 'home', '1026' ))) { dynamic_sidebar( 'CustomWidgetName' ); } }You can use the slug of the page, or the ID: https://developer.wordpress.org/reference/functions/is_page/ Best regards, 
 RikardFebruary 11, 2021 at 6:51 pm #1279834that’s good to know – thank you Rikard. would it be better to do it like this or via css like i did? which is more proper/full-proof? and, am i understanding correctly that the (! exclamation point is like saying “if is NOT these pages, then do…”? thanks again. February 14, 2021 at 5:17 am #1280372Hi, Thanks for the update. If you hide things with CSS, the source code is still on the page, but it’s not shown. If you exclude it using PHP, then it will never render. It’s up to your really, but the PHP solution might be the better choice. And yes, the ! at the beginning means; if it’s not one of these pages, go ahead render the sidebar. Best regards, 
 Rikard
- 
		AuthorPosts
- You must be logged in to reply to this topic.
