Customize header
-
Hello,
I’m trying to customize hezder by adding a secondary menu.
I’ve created a child theme.
I’ve duplicated header-extensions.php to child-header-extensions.php and copy this file in a library folder.
In my child functions.php :add_action( ‘init’, ‘remove_parent_attitude_load_files’ ); /** * Removes parent function attached to hook */ function remove_parent_attitude_load_files(){ remove_action( ‘child_attitude_load_file_hook’, ‘attitude_load_files’, 10 ); } add_action( ‘child_attitude_load_files_hook’, ‘child_attitude_load_filesr’, 10 ); /** * Add your custom function */ function child_attitude_load_filesr() { /** * attitude_add_files hook * * Adding other addtional files if needed. */ do_action( 'attitude_add_files' ); /** Load functions */ require_once( ATTITUDE_FUNCTIONS_DIR . '/i18n.php' ); require_once( ATTITUDE_FUNCTIONS_DIR . '/custom-header.php' ); require_once( ATTITUDE_FUNCTIONS_DIR . '/functions.php' ); require_once( ATTITUDE_ADMIN_DIR . '/attitude-themeoptions-defaults.php' ); require_once( ATTITUDE_ADMIN_DIR . '/theme-options.php' ); require_once( ATTITUDE_ADMIN_DIR . '/attitude-metaboxes.php' ); require_once( ATTITUDE_ADMIN_DIR . '/attitude-show-post-id.php' ); /** Load Shortcodes */ require_once( ATTITUDE_SHORTCODES_DIR . '/attitude-shortcodes.php' ); /** Load Structure */ require_once( ATTITUDE_STRUCTURE_DIR . '/child_header-extensions.php' ); require_once( ATTITUDE_STRUCTURE_DIR . '/searchform-extensions.php' ); require_once( ATTITUDE_STRUCTURE_DIR . '/sidebar-extensions.php' ); require_once( ATTITUDE_STRUCTURE_DIR . '/footer-extensions.php' ); require_once( ATTITUDE_STRUCTURE_DIR . '/content-extensions.php' ); /** Load Widgets and Widgetized Area */ require_once( ATTITUDE_WIDGETS_DIR . '/attitude_widgets.php' ); }But it still the header-extensions.php which writes my header.
Please, any help would be appreciated.
The topic ‘Customize header’ is closed to new replies.
