Is this specific layout possible?

Community Forums Forums Design Tips and Tricks Is this specific layout possible?

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  theMikeD 2 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #796

    theMikeD
    Participant
    Post count: 20

    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 2 years ago by  theMikeD.
    • This topic was modified 2 years ago by  theMikeD.
    #890

    SoZo
    Moderator
    Post count: 1573

    This is possible but would require custom coding


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #955

    theMikeD
    Participant
    Post count: 20

    Yes, 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 reply was modified 2 years ago by  theMikeD.
    • This reply was modified 2 years ago by  theMikeD.
    • This reply was modified 2 years ago by  theMikeD.
    • This reply was modified 2 years ago by  theMikeD.
    • This reply was modified 2 years ago by  theMikeD.
    • This reply was modified 2 years ago by  theMikeD.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.