• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to user navigation

PopWP

WordPress and Genesis Tutorials

  • Get Started
  • About
  • Archive
  • Services
  • Membership
  • My Account

Reposition elements and Add Widget area on Single Posts in Corporate Pro

Last Updated on May 4, 2019 Favorited: 0 times

This tutorial provides the Steps to Reposition the Hero Section and Post title on Single Posts in Corporate Pro.

https://www.facebook.com/groups/genesiswp/permalink/1950962328288288/?comment_id=1957232244327963&notif_id=1530786310666998&notif_t=group_comment_mention

Tobias Hagemeister posted in the comment section:

Hello everybody, I need some further customization work for the Corporate Pro theme. Could someone help me please (paid)? Maybe Aryan Raj ?

  1. Unregister genesis featured are on single blog posts
  2. Add new widget area for horizontal opt-in with a full width background color. (instead of current featured area)
  3. Move blog title into content (already done)
  4. Move featured image into content

Thanks!

Solution:

1. Reposition

Add the following in functions.php to reposition Hero section and Post title.

//move post title
add_action('genesis_after_header', 'reposition_post_title', 9);
function reposition_post_title()
{
    if (!is_single() ) {
        return;
    }
    //remove_action( 'genesis_entry_header', 'genesis_do_post_title', 2 );
    remove_action('corporate_hero_section', 'corporate_page_title', 10);
    add_action('genesis_entry_header', 'corporate_page_title', 10);
}

// featured image
add_action('genesis_after_header', 'reposition_post_image', 2);
function reposition_post_image()
{
    if (!is_single() ) {
        return;
	}
	remove_action( 'genesis_before_content_sidebar_wrap', 'corporate_hero_section', 10 );
	add_action('genesis_entry_header', 'corporate_hero_section', 9);

}

2. Widget area for Newsletter

STEP 1. Add the following in functions.php

// Step 1. Register Horizontal Opt-in widget area.
genesis_register_widget_area(
	array(
		'id'          => 'horizontal-opt-in',
		'name'        => __( 'Horizontal Opt-in', 'text-domain' ),
		'description' => __( 'This is the horizontal opt-in section.', 'text-domain' ),
	)
);
// Step 2. Display Horizontal Opt-in widget area below header
add_action( 'genesis_before_content_sidebar_wrap', 'genesiskit_horizontal_optin' );
function genesiskit_horizontal_optin() {
	if ( !is_single() ) {
		return;
	}
	genesis_widget_area( 'horizontal-opt-in', array(
		'before'	=> '<div id="horizontal-opt-in class="horizontal-opt-in widget-area"><div class="wrap">',
		'after'		=> '</div></div>',
	) );
}

STEP 2. Add the following CSS in style.css

/* Horizontal Opt-in
-------------------------------------------- */

.horizontal-opt-in {
	background-color: #f6f8fa;
    border: 1px solid #eceef14d;
    border-radius: 3px;
	color: #fff;
	padding: 20px;
	max-width: none;
    width: 100vw;
    left: 50%;
    margin-left: -50vw;
    position: relative;
	  padding: 15rem 0 10rem;
}
.horizontal-opt-in .enews-widget input {
	margin-bottom: 5px;
}

@media (min-width: 768px) {
.horizontal-opt-in .enews {
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-pack: center;
	-webkit-justify-content: center;
	    -ms-flex-pack: center;
	        justify-content: center;
	-webkit-box-align: center;
	-webkit-align-items: center;
	    -ms-flex-align: center;
	        align-items: center;
	max-width: 1000px;
	margin: 0 auto;
}



.horizontal-opt-in form {
	background: rgba(255, 255, 255, 0.18);
	border-radius: 8px;
	margin-bottom: 10px;
	padding: 20px 10px 5px;
	width: 100%;
}

.horizontal-opt-in .enews-widget input {
	width: 35%;
}

.horizontal-opt-in .enews-widget input[type="submit"] {
	width: 25%;
	padding: 0;
}
}

Minor Changes are Required.

Related Posts

  • How to Reposition Archive Title in Genesis
  • Hero Section with Full Width Titles in Genesis
  • Reposition Post info, Post title and Post meta in Startup Pro
  • Hero Section in Genesis
  • Academy Pro Hero Section in Genesis

Categories: Free Content, Genesis Tutorials Tags: Corporate Pro, hero section, reposition

Reader Interactions

Primary Sidebar

Search

WPEngine WordPress Hosting, Perfected.

Hosting You are looking for?.
Perfect solution for small business to global enterprise.

Learn more

StudioPress Genesis Theme Framework

The No.1 Theme Provider.
Creative, SEO rich Theme for all niche projects.

Learn more

Categories

  • Free Content
  • Genesis Tutorials
  • Premium Content
  • Snippets
  • What's New?
  • WordPress Tutorials

Tag Cloud

Archive Background Section blog canvas menu center logo columns conditional tags CSS CSS Grid custom Customizer custom post type Custom Post Types custom template Custom Widget effect eNews Extended Featured Image front-page Genesis Genesis Sample header right hero section Image Background js layout left menu Logo menu Navigation Menu newsletter post page related posts responsive menu search search widget Shrinking Logo site header slide in-out Stylesheet Template Utility Bar Video Background widgets WordPress

Built with Genesis Framework + WordPress by Aryan Raj

  • Contact
  • FAQ
  • Disclaimer
  • Privacy Policy
  • Copyright Policy
  • Terms of Service