Community Forums › Forums › Archived Forums › Design Tips and Tricks › Error help?
- This topic has 5 replies, 3 voices, and was last updated 10 years, 5 months ago by ecoofficegals.
-
AuthorPosts
-
November 16, 2013 at 11:31 am #73433ecoofficegalsMember
A clients site is getting the following error any ideas?
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'after_header_banner' was given in /home2/khporter/public_html/wp-includes/plugin.php on line 429
http://healingrescuedogs.com/ is the site. Thanks in advance.
Jen Smith
Owner, Eco-Office GalsNovember 16, 2013 at 12:59 pm #73442RobGMemberLooks to be ok now.
To speed up the process please post the link to the website in question.
We recommend using Firebug to view source codes http://getfirebug.com/
RobGoss WordPress Developer
We build WordPress websites for your business or personal goals
http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgossNovember 16, 2013 at 11:53 pm #73522nutsandboltsMemberI see the error. Can you paste in the contents of your functions.php? It's possible that a plugin is causing the issue (try deactivating all plugins first to see if it goes away), but
after_header_banner
looks like part of a function to me.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+November 17, 2013 at 9:02 am #73552ecoofficegalsMemberFirst thing I tried is deactivating all plugins it didn't help, see the last line of functions.php someone in the support helped me come up with this code to get the banner back in, maybe it's this? Code is:
<?php
//* Start the engine
include_once( get_template_directory() . '/lib/init.php' );//* Set Localization (do not remove)
load_child_theme_textdomain( 'eleven40', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'eleven40' ) );//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', __( 'eleven40 Pro Theme', 'eleven40' ) );
define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/eleven40/' );
define( 'CHILD_THEME_VERSION', '2.0' );//* Add HTML5 markup structure
add_theme_support( 'html5' );//* Add viewport meta tag for mobile browsers
add_theme_support( 'genesis-responsive-viewport' );//* Load Puritan Google fonts
add_action( 'wp_enqueue_scripts', 'custom_load_google_fonts' );
function custom_load_google_fonts() {
wp_enqueue_style( 'google-font', '//fonts.googleapis.com/css?family=Puritan:300,400,700', array(), PARENT_THEME_VERSION );
}//* Add new featured image size
add_image_size( 'grid-featured', 270, 100, TRUE );//* Add support for custom header
add_theme_support( 'custom-header', array(
'width' => 320,
'height' => 65,
'header-selector' => '.site-header .title-area',
'header-text' => false
) );//* Add support for structural wraps
add_theme_support( 'genesis-structural-wraps', array(
'header',
'nav',
'subnav',
'site-inner',
'footer-widgets',
'footer'
) );//* Add support for additional color styles
add_theme_support( 'genesis-style-selector', array(
'eleven40-pro-blue' => __( 'eleven40 Pro Blue', 'eleven40' ),
'eleven40-pro-green' => __( 'eleven40 Pro Green', 'eleven40' ),
'eleven40-pro-red' => __( 'eleven40 Pro Red', 'eleven40' )
) );//* Reposition the 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_before_content_sidebar_wrap', 'genesis_do_nav' );//* Reposition the secondary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_subnav' );//* Add support for 3-column footer widgets
add_theme_support( 'genesis-footer-widgets', 3 );add_action( 'genesis_after_header', 'after_header_banner' );
function add_text_genesis() {
echo '<div class="home-banner"></div>';
};
add_action('genesis_after_header', 'add_text_genesis');
Jen Smith
Owner, Eco-Office GalsNovember 17, 2013 at 9:45 am #73555nutsandboltsMemberOkay, you've got two different actions and only one function. It's kind of hard to tell what's going on with the banner but this:
function add_text_genesis() { echo ‘<div class=”home-banner”><img src="http://healingrescuedogs.com/wp-content/uploads/2012/11/Healing-Rescue-Dogs-Banner-960x198-1.jpg" width="960" height="1989" class="aligncenter size-full wp-image-39603"></div>'; } add_action('genesis_after_header', 'add_text_genesis');
should display the banner on its own.
Try removing this:
add_action( ‘genesis_after_header’, ‘after_header_banner’ );
Unless there's another reason it's there that I'm not seeing, you should be able to remove that without affecting the banner.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+November 17, 2013 at 9:56 am #73557ecoofficegalsMemberThink that did it. Thanks!
Jen Smith
Owner, Eco-Office Gals -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.