Reply To: hook before both sidebars

Home Forums Support hook before both sidebars Reply To: hook before both sidebars

Home Forums Support hook before both sidebars Reply To: hook before both sidebars

#204337
Tom
Lead Developer
Lead Developer

Alright, I believe I have a solution for you πŸ™‚

First, you would add this function:

add_action( 'generate_sidebars','generate_double_right_sidebar', 0 );
function generate_double_right_sidebar()
{
	?>
	<div class="widget-area grid-50 tablet-grid-50 grid-parent sidebar double-sidebar">
		<div class="inside-double-sidebar">
			Hi there
		</div>
	</div>
	<?php
}

grid-50 is assuming both of your sidebars are set to 25% – 25 x 2 = 50. If your sidebars are set to something else, you’ll need to adjust this.

Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

Then you’ll need to add this CSS:

.inside-double-sidebar {
    margin-top:20px; /* Separating space value */
    background: #FFF; /* Widget background color value */
    padding: 40px; /* Inside width padding value */
}

Adding CSS: https://generatepress.com/knowledgebase/adding-css/

That should do it πŸ™‚