Sidebar With Fallback Message

Standard WordPress Sidebar function. Displays the sidebar if it has widgets assigned to it. If not, it displays a message.

Simple example of conditional logic applied to a WordPress sidebar. Add the following code snippet to your theme functions.php file

<?php if(dynamic_sidebar('footer_left' ): )?>
	<?php else: ?>
	<p>This message will display if there's no content in the sidebar.</p>
<?php endif; ?>

Hire a WordPress Expert

Get hourly and project based theme customization, theme tweaks, and development help from an experience Kelowna WordPress developer. Or, if you’re in Kelowna and need a new WordPress website for your business, visit our Website Design page now to get started.