• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Is this specific layout possible?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

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

This topic is: resolved
  • This topic has 2 replies, 2 voices, and was last updated 10 years, 6 months ago by theMikeD.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • November 19, 2012 at 10:31 pm #796
    theMikeD
    Participant

    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!

    November 20, 2012 at 11:42 am #890
    SoZo
    Member

    This is possible but would require custom coding


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

    November 20, 2012 at 3:56 pm #955
    theMikeD
    Participant

    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.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Is this specific layout possible?’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble