Skip to content

Instantly share code, notes, and snippets.

@tibicostan
Last active March 21, 2016 17:53
Show Gist options
  • Save tibicostan/a025fd840c11e3f42d9d to your computer and use it in GitHub Desktop.
Save tibicostan/a025fd840c11e3f42d9d to your computer and use it in GitHub Desktop.
<?php
/**
* Put this in your theme or child theme's functions.php file.
*/
function en_register_campaigns_sidebar() {
$args = array(
'id' => 'campaigns-sidebar',
'name' => __( 'Campaigns Sidebar', 'holycrosss.staging.wpengine.com' ),
);
register_sidebar( $args );
}
add_action( 'widgets_init', 'en_register_campaigns_sidebar' );
@tibicostan
Copy link
Author

I put that code at the end of functions.php (my sidebar is Campaigns Sidebar) an added on sidebar.php the next one:

    <?php 
    dynamic_sidebar( $porto_sidebar );
    dynamic_sidebar( 'campaigns-sidebar' ); ?>

Still no sidebar showing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment