Forum Replies Created
-
AuthorPosts
-
BlueSunIncMember
That makes sense, Lorraine. Here's the template code. Where would I insert the loop then?
<?php /* * Template Name: Home Page 2 */ /** * This file adds the Home Page to the Streamline Pro Theme. * * @author StudioPress * @package Streamline Pro * @subpackage Customizations */ add_action( 'genesis_meta', 'streamline_home_genesis_meta' ); /** * Add widget support for homepage. If no widgets active, display the default loop. * */ function streamline_home_genesis_meta() { if ( is_active_sidebar( 'home-featured-1' ) || is_active_sidebar( 'home-featured-2' ) || is_active_sidebar( 'home-featured-3' ) ) { //* Force content-sidebar layout setting add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); // Add streamline-pro-home body class add_filter( 'body_class', 'streamline_body_class' ); // Add homepage widgets add_action( 'genesis_before_content_sidebar_wrap', 'streamline_homepage_widgets' ); } } function streamline_body_class( $classes ) { $classes[] = 'streamline-pro-home'; return $classes; } function streamline_homepage_widgets() { if ( is_active_sidebar( 'home-featured-1' ) || is_active_sidebar( 'home-featured-2' ) || is_active_sidebar( 'home-featured-3' ) ) { echo '<div class="home-featured">'; genesis_widget_area( 'home-featured-1', array( 'before' => '<div class="home-featured-1 widget-area">', 'after' => '</div>', ) ); genesis_widget_area( 'home-featured-2', array( 'before' => '<div class="home-featured-2 widget-area">', 'after' => '</div>', ) ); genesis_widget_area( 'home-featured-3', array( 'before' => '<div class="home-featured-3 widget-area">', 'after' => '</div>', ) ); echo '</div><!-- end #home-featured -->'; } } genesis();
BlueSunIncMemberHere's the functions.php file:
<?php //* Start the engine include_once( get_template_directory() . '/lib/init.php' ); //* Set Localization (do not remove) load_child_theme_textdomain( 'streamline', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'streamline' ) ); //* Child theme (do not remove) define( 'CHILD_THEME_NAME', __( 'Streamline Pro Theme', 'streamline' ) ); define( 'CHILD_THEME_URL', 'http://my.studiopress.com/streamline/' ); define( 'CHILD_THEME_VERSION', '2.0.0' ); //* Add HTML5 markup structure add_theme_support( 'html5' ); //* Add viewport meta tag for mobile browsers add_theme_support( 'genesis-responsive-viewport' ); //* Enqueue PT Sans Google font add_action( 'wp_enqueue_scripts', 'streamline_google_fonts' ); function streamline_google_fonts() { wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=PT+Sans', array(), CHILD_THEME_VERSION ); } //* Enqueue Responsive Menu Script add_action( 'wp_enqueue_scripts', 'streamline_enqueue_responsive_script' ); function streamline_enqueue_responsive_script() { wp_enqueue_script( 'streamline-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' ); } //* Add support for additional color style options add_theme_support( 'genesis-style-selector', array( 'streamline-pro-blue' => __( 'Streamline Pro Blue', 'streamline' ), 'streamline-pro-green' => __( 'Streamline Pro Green', 'streamline' ), ) ); //* Add new image sizes add_image_size( 'post-image', 760, 360, TRUE ); add_image_size( 'widget-image', 295, 100, TRUE ); //* 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' ); //* Add support for custom background add_theme_support( 'custom-background' ); //* Add support for custom header add_theme_support( 'custom-header', array( 'header_image' => '', 'header-selector' => '.site-title a', 'header-text' => false, 'flex-width' => true, 'width' => 550, 'flex-height' => true, 'height' => 180, ) ); //* Add support for 3-column footer widgets add_theme_support( 'genesis-footer-widgets', 3 ); //* Reposition the breadcrumbs remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_breadcrumbs' ); //* Customize breadcrumbs display add_filter( 'genesis_breadcrumb_args', 'streamline_breadcrumb_args' ); function streamline_breadcrumb_args( $args ) { $args['home'] = __( 'Home', 'streamline' ); $args['sep'] = ' '; $args['list_sep'] = ', '; // Genesis 1.5 and later $args['prefix'] = '<div class="breadcrumb">'; $args['suffix'] = '</div>'; $args['labels']['prefix'] = '<span class="icon-home">'; $args['labels']['suffix'] = '</div>'; return $args; } //* Remove default post image remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); //* Add post image above post title add_action( 'genesis_entry_header', 'streamline_post_image', 1 ); function streamline_post_image() { if ( is_page() || ! genesis_get_option( 'content_archive_thumbnail' ) ) return; if ( $image = genesis_get_image( array( 'format' => 'url', 'size' => genesis_get_option( 'image_size' ) ) ) ) { printf( '<a href="%s" rel="bookmark"><img class="post-photo" src="%s" alt="%s" /></a>', get_permalink(), $image, the_title_attribute( 'echo=0' ) ); } } //* Reposition the post info function remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); add_action( 'genesis_entry_header', 'genesis_post_info', 2 ); //* Customize the post info function add_filter( 'genesis_post_info', 'post_info_filter' ); function post_info_filter( $post_info ) { if ( !is_page() ) { $post_info = '[post_author_posts_link] [post_date] [post_comments] [post_edit]'; return $post_info; } } //* Add the after entry section add_action( 'genesis_entry_footer', 'streamline_after_entry', 10 ); function streamline_after_entry() { if ( ! is_singular( 'post' ) ) return; genesis_widget_area( 'after-entry', array( 'before' => '<div class="after-entry widget-area">', 'after' => '</div>', ) ); } //* Modify the size of the Gravatar in the author box add_filter( 'genesis_author_box_gravatar_size', 'streamline_author_box_gravatar_size' ); function streamline_author_box_gravatar_size( $size ) { return '80'; } //* Remove comment form allowed tags add_filter( 'comment_form_defaults', 'streamline_remove_comment_form_allowed_tags' ); function streamline_remove_comment_form_allowed_tags( $defaults ) { $defaults['comment_notes_after'] = ''; return $defaults; } // Register widget areas genesis_register_sidebar( array( 'id' => 'home-featured-1', 'name' => __( 'Home - Featured 1', 'streamline' ), 'description' => __( 'This is the first featured column on the homepage.', 'streamline' ), ) ); genesis_register_sidebar( array( 'id' => 'home-featured-2', 'name' => __( 'Home - Featured 2', 'streamline' ), 'description' => __( 'This is the second featured column on the homepage.', 'streamline' ), ) ); genesis_register_sidebar( array( 'id' => 'home-featured-3', 'name' => __( 'Home - Featured 3', 'streamline' ), 'description' => __( 'This is the third featured column on the homepage.', 'streamline' ), ) ); genesis_register_sidebar( array( 'id' => 'after-entry', 'name' => __( 'After Entry', 'streamline' ), 'description' => __( 'This is the after entry section.', 'streamline' ), ) ); //* Display a custom favicon add_filter( 'genesis_pre_load_favicon', 'sp_favicon_filter' ); function sp_favicon_filter( $favicon_url ) { return 'http://www.teamrcia.com/favicon.ico'; }
BlueSunIncMemberThank you, sir! Yes, I did some poking around and found the front-page.php. That combined with the Custom Sidebars plugin I think this will work nicely for the client.
BlueSunIncMemberThat worked! Thanks so much.
BlueSunIncMemberI can, I'll give it a shot and let you know what happens. Thanks so much!
BlueSunIncMemberWhile customizing I had commented out the portion below and another coder on FB caught it. All fixed.
border-top: 1px solid #444; left: -9999px;
BlueSunIncMemberFixed it. Was missing the closing </form> tag in the header widget code.
BlueSunIncMemberIt's doing it on the demo too, you can look at it here: http://studio.bluesunstudio-inc.com/teamrcia/
BlueSunIncMemberThanks for asking. No, I never got a solution for it. Any assistance you could offer would be a great help. Thanks!
BlueSunIncMemberThanks, contact form sent.
February 20, 2014 at 10:10 pm in reply to: Help Please—Sub Navigation disappearing when mouse-over #91548BlueSunIncMemberI'm glad I'm not the only one baffled by it 🙂
February 20, 2014 at 10:01 pm in reply to: Help Please—Sub Navigation disappearing when mouse-over #91545BlueSunIncMemberPerfecto! Thanks so much.
BlueSunIncMemberSusan, his site is a goldmine. I found an answer there for making a page template for displaying individual headers on each page. This looks great, thanks so much.
Turns out the theme already had the horizontal bar coded in, but this is helpful too, I'm sure I'll need it sooner or later elsewhere.
BlueSunIncMemberWe figured it out. Here's the fix:
it's a setting that comes with the welcome widget. This is basically what needs to be taken care of:
#home-welcome { background: url("images/bg-welcome.png") repeat scroll 0 0 rgba(0, 0, 0, 0); overflow: hidden; padding: 10px 20px; }
This image is producing the black: images/bg-welcome.png
We removed the image and voila.
BlueSunIncMemberOkay, Anitac, the site is live and you can take a look. Thanks!
Also, the client wants that decorative bar behind the navigation to be attached to the navigation and change when the site is viewed on a mobile device instead of being a static part of the background, any tips for that?
BlueSunIncMemberCancel this. I fixed it. I replaced that percentage for the width in #services .alignleft with "auto" and it's normal now.
BlueSunIncMemberThanks Brad, but the plugin didn't make sense to me. I couldn't see how to set it in the actual navigation bar and not in a custom menu in the widget section.
However...I did find this snippet of code I added to the bottom of the CSS and that solved the problem right away:
`.sub-menu{display:inline-block; width:325px !important;}`
`.sub-menu li{width:50% !important;}`
`.sub-menu li a:hover{color:#FFFFFF;}`
`.sub-menu li:nth-child(even){float:right;}`
One problem solved...now does anyone know how to keep the dropdowns from disappearing the second I move the cursor to click on one?
BlueSunIncMemberThanks, and that's what I need to know next. I have her set up on the Backcountry theme. Also, when hovering over the secondary navigation buttons and going to click on the dropdown items, the dropdowns disappear really quickly. Is there any way to fix that? It's kind of frustrating trying to get the cursor placed just so, so that the dropdown stays.
BlueSunIncMemberThat's okay, I figured it out. It was as simple as changing the size of the thumbnail in the Featured Gallery widget. Total "duh" moment.
BlueSunIncMemberThanks Susan, those are very helpful and on the right track. Now there's just the question of the optin form in the header she wants on the interior pages only. I'm thinking the Custom Sidebars plugin might work. Do you have any ideas for that?
-
AuthorPosts