Community Forums › Forums › Design Tips and Tricks › Is this specific layout possible?
This topic contains 2 replies, has 2 voices, and was last updated by theMikeD 5 months, 4 weeks ago.
-
AuthorPosts
-
November 19, 2012 at 10:31 pm #796
OK, here is a layout question. I would like to lay out single.php such that:
The content of the blog post is full width under the header, and
Below the full width content is a sidebar on the left, and the comments for the post in the space to the right of the sidebar.Put another way: a sidebar-content layout, but the blog post content goes above #content-sidebar-wrap, making it full screen. Then the sidebar is used as a sidebar, and the #content area is used for comments only.
Here is a block diagram: http://i49.tinypic.com/20kpxee.jpg
Possible using filters etc? Is there a theme that does this already that I can copy? All advice welcome!
-
This topic was modified 6 months ago by
theMikeD.
-
This topic was modified 6 months ago by
theMikeD.
November 20, 2012 at 11:42 am #890This is possible but would require custom coding
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
November 20, 2012 at 3:56 pm #955Yes, I figured that much Sozo
For the record, here is the code that does it:
add_action( ‘genesis_before_content’, ‘md_get_upper_content’ );
function md_get_upper_content() {
echo “<div class=’upper-content’>”;
remove_action( ‘genesis_after_post’, ‘genesis_get_comments_template’ );
genesis_do_loop();
echo “</div>”;
}remove_action(‘genesis_loop’, ‘genesis_do_loop’);
add_action(‘genesis_loop’, ‘custom_loop’);
function custom_loop () {
global $post, $wp_query;
add_action( ‘genesis_after_post’, ‘genesis_get_comments_template’ ); // put back the comments we stripped earlier
remove_action( ‘genesis_before_post_content’, ‘genesis_post_info’ ); // remove author etc
remove_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ ); // remove meta
remove_action( ‘genesis_post_title’,'genesis_do_post_title’ ); // remove post title
remove_action( ‘genesis_post_content’, ‘genesis_do_post_content’ ); // removes content
remove_action( ‘genesis_before_post_content’, ‘genesis_post_title’ ); // remove the title
genesis_do_loop();
}
genesis();
?>eta: this would look better if either code option or the pre option were supported, but you get the idea.
-
This topic was modified 6 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.