• 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

Relocation of Entry Title and Text Widget to Outside Content Sidebar Wrap

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 › General Discussion › Relocation of Entry Title and Text Widget to Outside Content Sidebar Wrap

This topic is: not resolved

Tagged: content sidebar wrap, entry-title, parallax-pro

  • This topic has 8 replies, 2 voices, and was last updated 7 years, 7 months ago by susanta.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • February 8, 2016 at 12:34 pm #178588
    susanta
    Participant

    I'm trying to hook a text widget within the entry title that is located at genesis_before_content_sidebar_wrap.

    Although I'm able to relocate the text widget to the same location as the entry title, it doesn't stay under the relocated entry title within the same div.

    I've had a look at the hook reference on this site as well as the visual hook guide. However, I haven't been able to figure it out quite well as yet.

    Would appreciate your help!

    Cheers,

    http://theseomonthly.com/seo-audit/
    February 8, 2016 at 7:48 pm #178616
    Christoph
    Member

    Hi,

    I don't quite understand your issue.
    http://screencast.com/t/ySNNHBf3cR5

    You have everything located where you want it and entry-title and the widget-area are inside the same div, .site-inner...

    Can you explain what exactly you expect to happen/show?


    https://www.christophherr.com | Genesis Customizations | Buy me a coffee

    February 8, 2016 at 10:53 pm #178623
    susanta
    Participant

    Hello Christoph,

    Thanks a lot for reaching out to me! Appreciate it very much!

    I'm sorry this caused confusion - let me explain what I want to achieve to help you better understand the issue I'm facing.

    I would like to keep the intro title and text widget within the same div so they appear this way: http://www.awesomescreenshot.com/image/978377/1628427e75252b310f014db494d8f1bc
    (This could be achieved through making the following CSS tweak)
    header.entry-header {
    background: #aaa;
    }

    However, I also wanted to relocate both of them to outside the content wrap in order to help them appear screen-wide.

    To achieve that, I made the following changes to functions.php file:

    //* Reposition the entry title (requires HTML5 theme support)
    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_post_title', 2 );

    //* Register Sidebar to add a conditional widget
    genesis_register_sidebar( array(
    'id' => 'cta-2',
    'name' => __( 'Audit Intro Text', 'mp' ),
    'description' => __( 'This is the call to action section.', 'mp' ),
    ) );

    add_action( 'genesis_before_content_sidebar_wrap', 'audit_intro_text' );

    function audit_intro_text() {

    // If it's the SEO Audit page, display CTA #2
    if ( is_page( 'seo-audit' ) ) {
    genesis_widget_area( 'cta-2', array(
    'before' => '<div id="cta"><div class="wrap">',
    'after' => '</div></div>',
    ) );

    }
    }

    After making the changes, I can see this now: http://www.awesomescreenshot.com/image/978452/bad4a11123d50ea57ffc0c6179bb302c

    Therefore, the the text widget is not appearing within the entry-title div outside the wrap. Hence, the issue.

    Please, let me if I was able to explain the issues clearly.

    Thanks a ton for your time and help again!

    February 9, 2016 at 12:10 am #178630
    Christoph
    Member

    Thank you, now I understand.

    You don't really need a div. You simply want a container that includes both elements.
    Why not relocate the entry_header_markup, too?

     remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
    
    add_action( 'genesis_before_content_sidebar_wrap', 'genesis_entry_header_markup_open', 5 );
    add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_post_title' );

    And change

    'after' => '</div></div>',

    to

    'after' => '</div></div></header>',

    And add a background to entry-header.
    http://screencast.com/t/t8gJCg3EoL6
    http://screencast.com/t/yRZ4zr8fYYvW


    https://www.christophherr.com | Genesis Customizations | Buy me a coffee

    February 9, 2016 at 3:06 am #178636
    susanta
    Participant

    Thanks a lot for the quick help! It indeed helped me achieve the desired result!

    However, this seems to be interfering with the blog home and blog category sections in way that is unwarranted. (http://theseomonthly.com/news/)

    For example, it disregard the excerpts and shows the entire posts. Additionally, it hides/removes the post titles in all posts from the second post onward.

    Is there way to stop this from happening?

    February 9, 2016 at 4:12 am #178637
    susanta
    Participant

    Moreover, the entry-title is also appearing on the home page (http://www.awesomescreenshot.com/image/979201/b51c91deffd97aa4d8b00890275be92e)
    This is an aberration as I'm using Parallax Pro theme which has a widgetized front page.

    February 9, 2016 at 5:13 am #178638
    susanta
    Participant

    Alright, I figured out the full post display thing - it's because of the settings, but the hidden post titles from the second post onward issue could be caused by the code snippets. Just wanted to share this with you for clarity.

    PS: Currently, I have removed the code so you can't possibly see the issues I have discussed above. If you want me to replicate the issues, I can put the code back.

    February 9, 2016 at 10:11 am #178657
    Christoph
    Member

    You can wrap the code to move the entry_title_wrap in a conditional to only target that page or create a page template that includes the relocation and the displaying the widget area (without the conditional)


    https://www.christophherr.com | Genesis Customizations | Buy me a coffee

    February 9, 2016 at 10:59 am #178664
    susanta
    Participant

    I see! Thanks a lot for your time and help! I truly appreciate it!

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘General Discussion’ is closed to new topics and 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