wrap the code into some html tags (div or span) with a specific CSS class and apply some formatting;
example for the html code (reworked the code form your tutorial):
<?php if ( is_active_sidebar( 'sidebar-2' ) { ?><div class="header-widget-area"><?php dynamic_sidebar('sidebar-2'); ?></div><?php } ?>
the formatting in this example would be for .header-widget-area
, possibly including some fixed width and float: right
; details depend on your existing theme.
PS:
if you definitively only have one header widget, you can just try to use formatting for .headwidget
– width, float, etc….
I’ve done it! Thank you, I appreciate you taking your time to help. 🙂