Forum Replies Created
-
AuthorPosts
-
fortyfivecreativeMemberThis reply has been marked as private.fortyfivecreativeMember
Thanks, but in order to use the Genesis column classes I would need to apply column specific CSS rules 'one-third' 'one-third first'. I was hoping to do this entire task via function rather than using the widget and adding additional CSS.
David
fortyfivecreativeMemberSolved with a simpler solution. I added the full paths to the menu links, rather then just the anchor, e.g.
fortyfivecreativeMemberHi Susan,
Best of luck with the unanswered posts! Unfortunately I haven't had a response so any help would be appreciated.
Thanks
fortyfivecreativeMemberPerfect, thanks Gary...
fortyfivecreativeMemberThis reply has been marked as private.fortyfivecreativeMemberGreat, thanks for all your help. Much appreciated.
David
fortyfivecreativeMemberSorry, wasn't clear, I just meant will:
echo ‘<div id=”sidebar” class=”sidebar widget-area”>’;
dynamic_sidebar( ‘category_archive_sidebar’ );
echo ‘</div>’;
...create a complete sidebar with all the correct CSS?Thanks again
David
fortyfivecreativeMemberThanks again, and can I finally just ask you to check the sytnax of these parts of the code:
function category_archive_sidebar() {
echo ‘<div id=”sidebar” class=”sidebar widget-area”>’;
dynamic_sidebar( ‘category_archive_sidebar’ );
echo ‘</div>’;
}
AND
remove_action( ‘genesis_after_content’, ‘genesis_get_sidebar’ );
add_action( ‘genesis_after_content’, ‘single_post_sidebar’ );Are these complete and inline with the latest framework CSS structure?
Thanks
David
fortyfivecreativeMemberThanks. I actually think I need to ask about 'best practice' for adding the new sidebars. I've used the following code to add the sidebars without any additional PHP files, but not sure whether this is better or worse than doing this via sidebar-xx.php:
//* 45: Create and add new sidebars */
genesis_register_sidebar( array(
'id' => 'single-post-sidebar',
'name' => __( 'Single Post Sidebar', 'genesis' ),
'description' => __( 'This is the single post sidebar.', 'genesis' ),
) );genesis_register_sidebar( array(
'id' => 'category_archive_sidebar',
'name' => __( 'Category Archive Sidebar', 'genesis' ),
'description' => __( 'This is the category archive sidebar.', 'genesis' ),
) );genesis_register_sidebar( array(
'id' => 'tag_archive_sidebar',
'name' => __( 'Tag Archive Sidebar', 'genesis' ),
'description' => __( 'This is the tag archive sidebar.', 'genesis' ),
) );function single_post_sidebar() {
echo '<div id="sidebar" class="sidebar widget-area">';
dynamic_sidebar( 'single-post-sidebar' );
echo '</div>';
}function category_archive_sidebar() {
echo '<div id="sidebar" class="sidebar widget-area">';
dynamic_sidebar( 'category_archive_sidebar' );
echo '</div>';
}function tag_archive_sidebar() {
echo '<div id="sidebar" class="sidebar widget-area">';
dynamic_sidebar( 'tag_archive_sidebar' );
echo '</div>';
}function include_new_sidebar() {
if ( is_single() ) {
remove_action( 'genesis_after_content', 'genesis_get_sidebar' );
add_action( 'genesis_after_content', 'single_post_sidebar' );
} else if ( is_category() ) {
remove_action( 'genesis_after_content', 'genesis_get_sidebar' );
add_action( 'genesis_after_content', 'category_archive_sidebar' );
} else if ( is_tag() ) {
remove_action( 'genesis_after_content', 'genesis_get_sidebar' );
add_action( 'genesis_after_content', 'tag_archive_sidebar' );
}
}
add_action('get_header', 'include_new_sidebar');fortyfivecreativeMemberPerfect, thanks Jen.
-
AuthorPosts