Forum Replies Created
-
AuthorPosts
-
d00dbr0Member
Here is my front page code:
<?php /** * This file adds the Home Page to the Enterprise Pro Theme. * * @author StudioPress * @package Enterprise Pro * @subpackage Customizations */ add_action( 'genesis_meta', 'enterprise_home_genesis_meta' ); /** * Add widget support for homepage. If no widgets active, display the default loop. * */ function enterprise_home_genesis_meta() { if ( is_active_sidebar( ‘home-top-left’ ) || is_active_sidebar( ‘home-top-right’ ) || is_active_sidebar( ‘home-bottom’ ) ) { //* Force full-width-content layout setting add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); //* Add enterprise-pro-home body class add_filter( 'body_class', 'enterprise_body_class' ); //* Remove the default Genesis loop remove_action( 'genesis_loop', 'genesis_do_loop' ); //* Add home top widgets add_action( 'genesis_after_header', 'enterprise_home_top_widgets' ); //* Add home bottom widgets add_action( 'genesis_loop', 'enterprise_home_bottom_widgets' ); } } function enterprise_body_class( $classes ) { $classes[] = 'enterprise-pro-home'; return $classes; } function enterprise_home_top_widgets() { genesis_widget_area( 'home-top-left', array( 'before' => '<div class="home-top-left widget-area one-half first"><div class="wrap">', 'after' => '</div></div>', ) ); genesis_widget_area( 'home-top-right', array( 'before' => '<div class="home-top-right widget-area one-half"><div class="wrap">', 'after' => '</div></div>', ) ); } function enterprise_home_bottom_widgets() { genesis_widget_area( 'home-bottom', array( 'before' => '<div class="home-bottom widget-area">', 'after' => '</div>', ) ); } genesis();
And here is the functions file:
<?php //* Start the engine include_once( get_template_directory() . '/lib/init.php' ); //* Set Localization (do not remove) load_child_theme_textdomain( 'enterprise', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'enterprise' ) ); //* Child theme (do not remove) define( 'CHILD_THEME_NAME', __( 'Enterprise Pro Theme', 'enterprise' ) ); define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/enterprise/' ); define( 'CHILD_THEME_VERSION', '2.0.1' ); //* Add HTML5 markup structure add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) ); //* Add viewport meta tag for mobile browsers add_theme_support( 'genesis-responsive-viewport' ); //* Enqueue Lato and Titillium Web Google fonts add_action( 'wp_enqueue_scripts', 'enterprise_google_fonts' ); function enterprise_google_fonts() { wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:300,700,300italic|Titillium+Web:600', array(), CHILD_THEME_VERSION ); } //* Enqueue Responsive Menu Script add_action( 'wp_enqueue_scripts', 'enterprise_enqueue_responsive_script' ); function enterprise_enqueue_responsive_script() { wp_enqueue_script( 'enterprise-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' ); } //* Add new image sizes add_image_size( 'featured-image', 358, 200, TRUE ); add_image_size( 'home-top', 750, 400, TRUE ); //* Add support for custom header add_theme_support( 'custom-header', array( 'header-selector' => '.site-title a', 'header-text' => false, 'height' => 160, 'width' => 320, ) ); //* Add support for additional color style options add_theme_support( 'genesis-style-selector', array( 'enterprise-pro-black' => __( 'Enterprise Pro Black', 'enterprise' ), 'enterprise-pro-green' => __( 'Enterprise Pro Green', 'enterprise' ), 'enterprise-pro-orange' => __( 'Enterprise Pro Orange', 'enterprise' ), 'enterprise-pro-red' => __( 'Enterprise Pro Red', 'enterprise' ), 'enterprise-pro-teal' => __( 'Enterprise Pro Teal', 'enterprise' ), ) ); //* Add support for structural wraps add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'site-inner', 'footer-widgets', 'footer', ) ); //* Add support for 3-column footer widgets add_theme_support( 'genesis-footer-widgets', 3 ); //* Hook after post widget after the entry content add_action( 'genesis_after_entry', 'enterprise_after_entry', 5 ); function enterprise_after_entry() { if ( is_singular( 'post' ) ) genesis_widget_area( 'after-entry', array( 'before' => '<div class="after-entry widget-area">', 'after' => '</div>', ) ); } //* Remove comment form allowed tags add_filter( 'comment_form_defaults', 'enterprise_remove_comment_form_allowed_tags' ); function enterprise_remove_comment_form_allowed_tags( $defaults ) { $defaults['comment_notes_after'] = ''; return $defaults; } //* Register widget areas genesis_register_sidebar( array( 'id' => 'home-top-left', 'name' => __( 'Home - Top Left', 'enterprise' ), 'description' => __( 'This is the top left section of the homepage.', 'enterprise' ), ) ); genesis_register_sidebar( array( 'id' => 'home-top-right', 'name' => __( 'Home - Top Right', 'enterprise' ), 'description' => __( 'This is the top right section of the homepage.', 'enterprise' ), ) ); genesis_register_sidebar( array( 'id' => 'home-bottom', 'name' => __( 'Home - Bottom', 'enterprise' ), 'description' => __( 'This is the bottom section of the homepage.', 'enterprise' ), ) ); genesis_register_sidebar( array( 'id' => 'after-entry', 'name' => __( 'After Entry', 'enterprise' ), 'description' => __( 'This is the after entry widget area.', 'enterprise' ), ) );
d00dbr0Membermy apologies, I should have been more descriptive, I have text widgets in them both now with a few lines of text, and nothing is showing. Still same when I try other widgets.
d00dbr0MemberTry this:
In the front-page.php file, there will be code that reads://* Genesis grid loop function minimum_grid_loop_helper() { if ( function_exists( 'genesis_grid_loop' ) ) { genesis_grid_loop( array( 'features' => 0, 'feature_image_size' => 1, 'feature_content_limit' => 0, 'grid_image_size' => 0, 'grid_content_limit' => 250, 'more' => __( '[Read more]', 'minimum' ), ) ); } else { genesis_standard_loop(); } }
change the feature image size from “0″ to “1″, and go to genesis/theme settings, and check “show feature image”
Let me know if that helps
d00dbr0MemberThanks man, I figured it out, it was much easier than I thought. In the front-page.php file, there will be code that reads:
//* Genesis grid loop function minimum_grid_loop_helper() { if ( function_exists( 'genesis_grid_loop' ) ) { genesis_grid_loop( array( 'features' => 0, 'feature_image_size' => 1, 'feature_content_limit' => 0, 'grid_image_size' => 0, 'grid_content_limit' => 250, 'more' => __( '[Read more]', 'minimum' ), ) ); } else { genesis_standard_loop(); } }
I changed the feature image size from "0" to "1", and went to genesis/theme settings, and checked "show feature image"
d00dbr0MemberYeah, I'm using the minimum pro theme. By default, it doesn't show the featured image, no matter what selection I choose in the genesis settings. I believe that plugin is for adding default feature images that don't have one set.
In my case, I have them, just cant figure out how to get them to show.
Thanks for the reply though, I appreciate the help!
-
AuthorPosts