Page specific sidebar content in Genesis framework wordpress

Genesis-framework-design-tips

This is a simple task if you use the built in is_page() conditional tag in WordPress and use one of the Genesis structural action hooks. We’ll be using the genesis_before_sidebar_widget_area action hook in this example.

<?php
// Add additional sidebar content to the book page
add_action('genesis_before_sidebar_widget_area', 'child_genesis_sidebar');
function child_genesis_sidebar() {
if ( is_page('__SPECIFIC-PAGE-ID-OR-TITLE__')) { ?>
<your-content-code>
<?php
}
}
?>

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.