Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created March 29, 2016 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/54f0aac2d36cc3d183745c9bb03e773a to your computer and use it in GitHub Desktop.
Save billerickson/54f0aac2d36cc3d183745c9bb03e773a to your computer and use it in GitHub Desktop.
<?php
//* Register Category Archive widget areas
genesis_register_sidebar( array(
‘id’ =&gt; ‘before-content-cognition-memory’,
‘name’ =&gt; ‘Before Content Cognition &amp; Memory’,
‘description’ =&gt; ‘This is a sidebar that goes before the content.’,
) );
add_action( ‘genesis_before_content_sidebar_wrap’, ‘child_before_content_cognition_memory_sidebar’ );
/** Loads a new sidebar after the content */
function child_before_content_cognition_memory_sidebar() {
if( is_category( ‘3’ ) ) {
echo ”;
dynamic_sidebar( ‘before-content-cognition-memory’ );
echo ”;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment