About Sridhar Katakam
I am an independent WordPress web consultant with 10 years of experience in WordPress theme installation, customization, administration, maintenance, support, documentation, troubleshooting and PSD/design to WP.
Genesis and WordPress Tutorials
Session expired
Please log in again. The login page will open in a new tab. After logging in you can close it and return to this page.
This is GREAT! But I think in my case it’s different because I already did the following:
1. http://www.sridharkatakam.com/how-to-replace-background-image-in-minimum-pro-with-responsive-slider/
AND I did this too:
2. http://www.sridharkatakam.com/moving-primary-navigation-tagline-header-minimum-pro/
Plus just before you posted this I did:
3. http://www.sridharkatakam.com/how-to-set-up-sticky-header-or-navigation-in-genesis/
So needless to say my:
add_action( ‘genesis_after_header’, ‘genesis_do_nav’, 15 );
doesn’t look like that because it was commented out from Repositioning the secondary navigation menu… confused ;-(
The ABOVE 2 POSTS work great! Now I just need to accomplish what you have in THIS post…
This is my functions.php file:
‘__return_false’ ) );
//* Add support for custom header
add_theme_support( ‘custom-header’, array(
‘width’ => 320,
‘height’ => 60,
‘header-selector’ => ‘.site-title a’,
‘header-text’ => false
) );
//* Add support for structural wraps
add_theme_support( ‘genesis-structural-wraps’, array(
‘header’,
‘site-tagline’,
‘nav’,
‘subnav’,
‘home-featured’,
‘site-inner’,
‘footer-widgets’,
‘footer’
) );
//* Add support for 4-column footer widgets
add_theme_support( ‘genesis-footer-widgets’, 4 );
//* Unregister layout settings
genesis_unregister_layout( ‘content-sidebar-sidebar’ );
genesis_unregister_layout( ‘sidebar-content-sidebar’ );
genesis_unregister_layout( ‘sidebar-sidebar-content’ );
//* Unregister secondary sidebar
unregister_sidebar( ‘sidebar-alt’ );
//* Create portfolio custom post type
add_action( ‘init’, ‘minimum_portfolio_post_type’ );
function minimum_portfolio_post_type() {
register_post_type( ‘portfolio’,
array(
‘labels’ => array(
‘name’ => __( ‘Portfolio’, ‘minimum’ ),
‘singular_name’ => __( ‘Portfolio’, ‘minimum’ ),
),
‘exclude_from_search’ => true,
‘has_archive’ => true,
‘hierarchical’ => true,
‘menu_icon’ => get_stylesheet_directory_uri() . ‘/images/icons/portfolio.png’,
‘public’ => true,
‘rewrite’ => array( ‘slug’ => ‘portfolio’ ),
‘supports’ => array( ‘title’, ‘editor’, ‘author’, ‘thumbnail’, ‘excerpt’, ‘trackbacks’, ‘custom-fields’, ‘comments’, ‘revisions’, ‘page-attributes’, ‘genesis-seo’ ),
)
);
}
//* Remove site description
remove_action( ‘genesis_site_description’, ‘genesis_seo_site_description’ );
//* Reposition the primary navigation menu
//*remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
//*add_action( ‘genesis_after_header’, ‘genesis_do_nav’, 15 );
//* Reposition the secondary navigation menu
remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );
add_action( ‘genesis_footer’, ‘genesis_do_subnav’, 7 );
//* Reduce the secondary navigation menu to one level depth
add_filter( ‘wp_nav_menu_args’, ‘minimum_secondary_menu_args’ );
function minimum_secondary_menu_args( $args ){
if( ‘secondary’ != $args[‘theme_location’] )
return $args;
$args[‘depth’] = 1;
return $args;
}
//* Add the site tagline section
add_action( ‘genesis_after_header’, ‘minimum_site_tagline’, 17);
function minimum_site_tagline() {
printf( ”, genesis_attr( ‘site-tagline’ ) );
genesis_structural_wrap( ‘site-tagline’ );
printf( ”, genesis_attr( ‘site-tagline-left’ ) );
printf( ‘%s’, genesis_attr( ‘site-description’ ), esc_html( get_bloginfo( ‘description’ ) ) );
echo ”;
printf( ”, genesis_attr( ‘site-tagline-right’ ) );
genesis_widget_area( ‘site-tagline-right’ );
echo ”;
genesis_structural_wrap( ‘site-tagline’, ‘close’ );
echo ”;
}
//* Modify the size of the Gravatar in the author box
add_filter( ‘genesis_author_box_gravatar_size’, ‘minimum_author_box_gravatar’ );
function minimum_author_box_gravatar( $size ) {
return 144;
}
//* Modify the size of the Gravatar in the entry comments
add_filter( ‘genesis_comment_list_args’, ‘minimum_comments_gravatar’ );
function minimum_comments_gravatar( $args ) {
$args[‘avatar_size’] = 96;
return $args;
}
//* Change the number of portfolio items to be displayed (props Bill Erickson)
add_action( ‘pre_get_posts’, ‘minimum_portfolio_items’ );
function minimum_portfolio_items( $query ) {
if ( $query->is_main_query() && !is_admin() && is_post_type_archive( ‘portfolio’ ) ) {
$query->set( ‘posts_per_page’, ‘6’ );
}
}
//* Register widget areas
genesis_register_sidebar( array(
‘id’ => ‘site-tagline-right’,
‘name’ => __( ‘Site Tagline Right’, ‘minimum’ ),
‘description’ => __( ‘This is the site tagline right section.’, ‘minimum’ ),
) );
genesis_register_sidebar( array(
‘id’ => ‘home-full-width’,
‘name’ => __( ‘Home Full Width’, ‘minimum’ ),
‘description’ => __( ‘This is the home full width section.’, ‘minimum’ ),
) );
genesis_register_sidebar( array(
‘id’ => ‘home-featured-1’,
‘name’ => __( ‘Home Featured 1’, ‘minimum’ ),
‘description’ => __( ‘This is the home featured 1 section.’, ‘minimum’ ),
) );
genesis_register_sidebar( array(
‘id’ => ‘home-featured-2’,
‘name’ => __( ‘Home Featured 2’, ‘minimum’ ),
‘description’ => __( ‘This is the home featured 2 section.’, ‘minimum’ ),
) );
genesis_register_sidebar( array(
‘id’ => ‘home-featured-3’,
‘name’ => __( ‘Home Featured 3’, ‘minimum’ ),
‘description’ => __( ‘This is the home featured 3 section.’, ‘minimum’ ),
) );
genesis_register_sidebar( array(
‘id’ => ‘home-featured-4’,
‘name’ => __( ‘Home Featured 4’, ‘minimum’ ),
‘description’ => __( ‘This is the home featured 4 section.’, ‘minimum’ ),
) );
//* For Woo-commerce
add_theme_support( ‘genesis-connect-woocommerce’ );
/** Register widget area */
genesis_register_sidebar( array(
‘id’ => ‘home-slider’,
‘name’ => __( ‘Home Slider’, ‘minimum’ ),
‘description’ => __( ‘This is the home slider’, ‘minimum’ ),
) );
//* Add home slider between header and tagline
add_action( ‘genesis_after_header’, ‘minimum_slider’, 16 );
function minimum_slider() {
if (is_home() || is_front_page()) {
printf( ”, genesis_attr( ‘home-slider’ ) );
genesis_widget_area( ‘home-slider’ );
echo ”;
}
}
add_action( ‘wp_enqueue_scripts’, ‘custom_enqueue_script’ );
function custom_enqueue_script() {
wp_enqueue_script( ‘sticky-nav’, get_bloginfo( ‘stylesheet_directory’ ) . ‘/js/sticky-nav.js’, array( ‘jquery’ ), ”, true );
}
SORRY!!!! The top part of my functions.php file got cut off but it’s the typical top portion of this file …:
‘__return_false’ ) );
This is EXACTLY what I need but my ‘add action’ command looks different because I already followed 3 of your other posts…I already did the next 3:
I already repositioned the secondary nav menu as per one of your posts and I also followed your other post and added a slider after the header; and I already followed your post on making the Primary nav bar sticky…so how would I accomplish this post now then? Any help would be great! Your posts are super!
Should I take out the part about the Sticky Header and then try what you say in THIS post?
Yes.
Ok thank you, I tried your above recommendations.
Can you take a look at it for me?
It does seem like the header is ‘sticking’ now but it moved down now into the slider?
http://amystout.com/wordpress1/
I fixed it!!! Thank you for this post!! It helped me figure out how to make the menu stick, and it looks smooth. All I had to do was remove a little padding on top of the primary menu!
THANK YOU! I have build most of the top of my site using your posts!! Great stuff keep it coming!!
Ok but in this post you say to: Edit the functions.php and change:
add_action( ‘genesis_after_header’, ‘genesis_do_nav’, 15 ); to
add_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
My add-action doesn’t look like that it looks like this below because it’s commented out from your other post on Repositioning the primary nav menu…
See BELOW is commented out:
//* Reposition the primary navigation menu
//*remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
//*add_action( ‘genesis_after_header’, ‘genesis_do_nav’, 15 );
And then I have this:
//* Reposition the secondary navigation menu
remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );
add_action( ‘genesis_footer’, ‘genesis_do_subnav’, 7 );
So I’m not sure what to change to make because I don’t really have that part to change since it’s commented our from the post on repositioing the primary nav menu
I had the same questions as Amy. Turns out, if you want to reposition the nav and make it fixed with the header, this tutorial is all you need. So if you already repositioned the nav, undo that and do this instead. Look at the screencast for an example of exactly what this tutorial accomplishes on its own.
Hi,
I have problem with background image in minimum pro theme. I would like background image to scroll up with the rest of the content of the website. Scroll option in custom background area doesn’t work. Can you help me please? What needs to be done? Thank you.
http://www.sridharkatakam.com/setting-responsive-image-place-background-minimum-pro/
Hi Sridhar
I like this solution but I have a problem with the primary menu above the main image at mobile sizes. It takes up too much real estate at the top of the mobile screen. I don’t think two hamburger icons, one above the other, is the answer.
Can you advise on a solution?
Many thanks
N.
Neil,
Did you ever find a solution to this double hamburger navigation on mobile devices?
Thx
Cate
Sorry Cate, I’m not sure I did. But I’ve moved my test site away from Minimum Pro since then.
Cheers
Neil
Hey,
Does this also work for the Enterprise Pro theme?
tnx