Forum Replies Created
-
AuthorPosts
-
blueivorycreative
MemberActually, I just figured it out! There was a missing bracket somewhere in there that was throwing everything off.
Thanks so much for your help! You've been very patient and I really appreciate it.
blueivorycreative
MemberI don't have any caching plugins. I think we're ready to launch the site -- that's the only thing that needs fixing. If we launch it, would that help you be able to figure out the problem?
blueivorycreative
MemberI fixed that issue on my own and the site works and there is the new widget area. However, when I add new widgets to the area, they don't save in that area. I go to the home page and the widgets aren't there, and when I go back to the widget page, the widgets aren't there anymore.
blueivorycreative
Member<?php
/**
* This file adds the Home Page to the Executive Pro Theme.
*
* @author StudioPress
* @package Generate
* @subpackage Customizations
*/add_action( 'genesis_meta', 'executive_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
*/
function executive_home_genesis_meta() {if ( is_active_sidebar( ‘home-slider’ ) || is_active_sidebar( ‘home-top’ ) || is_active_sidebar('home-second') || is_active_sidebar( ‘home-cta’ ) || is_active_sidebar( ‘home-middle’ ) ) {
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'executive_home_sections' );
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
add_filter( 'body_class', 'executive_add_home_body_class' );}
}
function executive_home_sections() {
genesis_widget_area( 'home-slider', array(
'before' => '<div class="home-slider widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-top', array(
'before' => '<div class="home-top widget-area">',
'after' => '</div>',
) );
genesis_widget_area( ‘home-second’, array(
‘before’ => ‘<div class=”home-second widget-area”>’,
‘after’ => ‘</div>’,
) );genesis_widget_area( 'home-cta', array(
'before' => '<div class="home-cta widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-middle', array(
'before' => '<div class="home-middle widget-area">',
'after' => '</div>',
) );}
//* Add body class to home page
function executive_add_home_body_class( $classes ) {$classes[] = 'executive-pro-home';
return $classes;}
genesis();
blueivorycreative
MemberThe issue seemed to have occurred when editing the home page, not the functions.php.
blueivorycreative
MemberSo I fixed the "white screen of death" and it let me add all the code that you mentioned. Another widget area was created, but now when I load the page, the website is white. So I can log in and edit the files, unlike before, but the site itself won't show up. Do you have any idea what could cause this?
blueivorycreative
MemberSo basically he needs to delete the current functions.php file and replace it with the original, yeah?
And I know he can change this via FTP and I backed it up 🙂
blueivorycreative
MemberOkay, as I mentioned before, the client has it on his own private server, which I don't have access to. Is there an easy way for me to tell him how to do this?
blueivorycreative
MemberSo I started with the first step that you suggested, but it didn't even get through saving the file when a white screen appeared. Now, every time I try to login, it won't let me; only the white screen comes up.
Is this a server issue? Or a PHP memory issue? Or something else?
blueivorycreative
MemberWell, it's not a new widget area. I literally just added the three new widgets below the other three in the Top area.
Would adding a new widget area solve the issue?
blueivorycreative
MemberOkay, yeah that makes sense.
Functions.php is:
<?php
//* Start the engine
require_once( get_template_directory() . '/lib/init.php' );//* Set Localization (do not remove)
load_child_theme_textdomain( 'executive', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'executive' ) );//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', __( 'Executive Pro Theme', 'executive' ) );
define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/executive/' );
define( 'CHILD_THEME_VERSION', '3.0.0' );//* Add HTML5 markup structure
add_theme_support( 'html5' );//* Add viewport meta tag for mobile browsers
add_theme_support( 'genesis-responsive-viewport' );//* Enqueue Google fonts
add_action( 'wp_enqueue_scripts', 'executive_google_fonts' );
function executive_google_fonts() {wp_enqueue_style( 'google-font', '//fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700', array(), CHILD_THEME_VERSION );
}
//* Add new image sizes
add_image_size( 'featured', 300, 100, TRUE );
add_image_size( 'portfolio', 300, 200, TRUE );
add_image_size( 'slider', 1140, 445, TRUE );//* Add support for custom background
add_theme_support( 'custom-background' );//* Remove the post meta function
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );//* Add support for custom header
add_theme_support( 'custom-header', array(
'width' => 260,
'height' => 100,
'header-selector' => '.site-title a',
'header-text' => false
) );//* Add support for additional color style options
add_theme_support( 'genesis-style-selector', array(
'executive-pro-brown' => __( 'Executive Pro Brown', 'executive' ),
'executive-pro-green' => __( 'Executive Pro Green', 'executive' ),
'executive-pro-orange' => __( 'Executive Pro Orange', 'executive' ),
'executive-pro-purple' => __( 'Executive Pro Purple', 'executive' ),
'executive-pro-red' => __( 'Executive Pro Red', 'executive' ),
'executive-pro-teal' => __( 'Executive Pro Teal', 'executive' ),
) );//* Add support for 3-column footer widgets
add_theme_support( 'genesis-footer-widgets', 3 );//* 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' );//* Load Admin Stylesheet
add_action( 'admin_enqueue_scripts', 'executive_load_admin_styles' );
function executive_load_admin_styles() {wp_register_style( 'custom_wp_admin_css', get_stylesheet_directory_uri() . '/lib/admin-style.css', false, '1.0.0' );
wp_enqueue_style( 'custom_wp_admin_css' );}
//* Create Portfolio Type custom taxonomy
add_action( 'init', 'executive_type_taxonomy' );
function executive_type_taxonomy() {register_taxonomy( 'portfolio-type', 'portfolio',
array(
'labels' => array(
'name' => _x( 'Types', 'taxonomy general name', 'executive' ),
'add_new_item' => __( 'Add New Portfolio Type', 'executive' ),
'new_item_name' => __( 'New Portfolio Type', 'executive' ),
),
'exclude_from_search' => true,
'has_archive' => true,
'hierarchical' => true,
'rewrite' => array( 'slug' => 'portfolio-type', 'with_front' => false ),
'show_ui' => true,
'show_tagcloud' => false,
)
);}
//* Create portfolio custom post type
add_action( 'init', 'executive_portfolio_post_type' );
function executive_portfolio_post_type() {register_post_type( 'portfolio',
array(
'labels' => array(
'name' => __( 'Portfolio', 'executive' ),
'singular_name' => __( 'Portfolio', 'executive' ),
),
'has_archive' => true,
'hierarchical' => true,
'menu_icon' => get_stylesheet_directory_uri() . '/lib/icons/portfolio.png',
'public' => true,
'rewrite' => array( 'slug' => 'portfolio', 'with_front' => false ),
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'revisions', 'page-attributes', 'genesis-seo', 'genesis-cpt-archives-settings' ),
'taxonomies' => array( 'portfolio-type' ),)
);}
//* Add Portfolio Type Taxonomy to columns
add_filter( 'manage_taxonomies_for_portfolio_columns', 'portfolio_columns' );
function portfolio_columns( $taxonomies ) {$taxonomies[] = 'portfolio-type';
return $taxonomies;}
//* Remove the site description
remove_action( 'genesis_site_description', 'genesis_seo_site_description' );//* Set Genesis Responsive Slider defaults
add_filter( 'genesis_responsive_slider_settings_defaults', 'executive_responsive_slider_defaults' );
function executive_responsive_slider_defaults( $defaults ) {$args = array(
'location_horizontal' => 'Left',
'location_vertical' => 'Top',
'posts_num' => '3',
'slideshow_excerpt_content_limit' => '100',
'slideshow_excerpt_content' => 'full',
'slideshow_excerpt_width' => '30',
'slideshow_height' => '445',
'slideshow_more_text' => __( 'Continue Reading…', 'executive' ),
'slideshow_title_show' => 1,
'slideshow_width' => '1140',
);$args = wp_parse_args( $args, $defaults );
return $args;
}//* Relocate the post info
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
add_action( 'genesis_entry_header', 'genesis_post_info', 5 );//* Change the number of portfolio items to be displayed (props Bill Erickson)
add_action( 'pre_get_posts', 'executive_portfolio_items' );
function executive_portfolio_items( $query ) {if( $query->is_main_query() && !is_admin() && is_post_type_archive( 'portfolio' ) ) {
$query->set( 'posts_per_page', '12' );
}}
//* Customize Portfolio post info and post meta
add_filter( 'genesis_post_info', 'executive_portfolio_post_info_meta' );
add_filter( 'genesis_post_meta', 'executive_portfolio_post_info_meta' );
function executive_portfolio_post_info_meta( $output ) {if( 'portfolio' == get_post_type() )
return '';return $output;
}
//* Register widget areas
genesis_register_sidebar( array(
'id' => 'home-slider',
'name' => __( 'Home - Slider', 'executive' ),
'description' => __( 'This is the slider section on the home page.', 'executive' ),
) );
genesis_register_sidebar( array(
'id' => 'home-top',
'name' => __( 'Home - Top', 'executive' ),
'description' => __( 'This is the top section of the home page.', 'executive' ),
) );
genesis_register_sidebar( array(
'id' => 'home-cta',
'name' => __( 'Home - Call To Action', 'executive' ),
'description' => __( 'This is the call to action section on the home page.', 'executive' ),
) );
genesis_register_sidebar( array(
'id' => 'home-middle',
'name' => __( 'Home - Middle', 'executive' ),
'description' => __( 'This is the middle section of the home page.', 'executive' ),
) );And front page.php is:
<?php
/**
* This file adds the Home Page to the Executive Pro Theme.
*
* @author StudioPress
* @package Generate
* @subpackage Customizations
*/add_action( 'genesis_meta', 'executive_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
*/
function executive_home_genesis_meta() {if ( is_active_sidebar( 'home-slider' ) || is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-cta' ) || is_active_sidebar( 'home-middle' ) ) {
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'executive_home_sections' );
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
add_filter( 'body_class', 'executive_add_home_body_class' );}
}
function executive_home_sections() {
genesis_widget_area( 'home-slider', array(
'before' => '<div class="home-slider widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-top', array(
'before' => '<div class="home-top widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-cta', array(
'before' => '<div class="home-cta widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-middle', array(
'before' => '<div class="home-middle widget-area">',
'after' => '</div>',
) );}
//* Add body class to home page
function executive_add_home_body_class( $classes ) {$classes[] = 'executive-pro-home';
return $classes;}
genesis();
Thanks so much for your help! I'm a designer, not a coder, so I really appreciate it!
blueivorycreative
MemberThe overall HTML for the Top Widget Area is as follows:
<div class="home-top widget-area">
<section id="featured-page-4" class="widget featured-content featuredpage">
<section id="featured-page-5" class="widget featured-content featuredpage">
<section id="featured-page-6" class="widget featured-content featuredpage">
<section id="featured-page-7" class="widget featured-content featuredpage">
<section id="featured-page-8" class="widget featured-content featuredpage">
<section id="featured-page-9" class="widget featured-content featuredpage">
</div>Then the CSS for the Top Widget Area is:
*::-webkit-input-placeholder {
color:#999999;
}
style.cs...ver=3.0.0
.home-middle, .home-top {
background-color:#FFFFFF;
clear:both;
overflow:hidden;
padding:6rem 3rem 0;
}
style.cs...ver=3.0.0
*, input[type="search"] {
box-sizing:border-box;
}And for each individual widget (all of which are exactly the same, even though the problem is occurring):
*::-webkit-input-placeholder {
color:#999999;
}
style.cs...ver=3.0.0
.home-middle .widget, .home-top .widget {
float:left;
padding:0 2.8%;
width:33.33333333333%;
}
style.cs...ver=3.0.0
*, input[type="search"] {
box-sizing:border-box;
}
style.cs...ver=3.0.0
article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {
display:block;
}blueivorycreative
MemberThat makes sense, but when I examined the page with Firebug, I only found divs for the entire Top area and for the widgets individually, not one for the bottom three widgets. Is there a specific tag that I'm looking for?
November 2, 2013 at 7:17 am in reply to: Executive Pro – responsive slider with sticky posts? #70496blueivorycreative
MemberDid that work for you? I just created a post category called "slider" and changed the settings on the slider only to display those posts. Therefore, only the posts I want are shown, but I can still update my blog on a regular basis.
-
AuthorPosts