fly_in_the_sky | C'est grâce au template, il y a un appel dans les templates qui appelle le header, et le footer.
voici le fichier header.php de mon thème.
Code :
- <?php
- /**
- * @package WordPress
- * @subpackage Aegaeus
- */
- global $data, $post;
- ?>
- <!DOCTYPE HTML>
- <!-- START html -->
- <!--[if IE 8]>
- <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); echo ' class="ie ie8"';?>>
- <![endif]-->
- <!--[if !IE]>-->
- <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes();
- if(is_admin_bar_showing()) {
- echo ' style="margin-top:28 !important; "';
- }?>>
- <!--<![endif]-->
- <!-- START head -->
- <head>
- <?php if ( !is_404() ) print_meta_tags( get_the_ID() ); ?>
- <?php add_favicon(); ?>
- <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" type="text/css" media="screen" />
- <?php if($data['hb_use_custom_typography']){ ?>
- <!-- BEGIN Typography Styles from Theme Options -->
- <style type="text/css">
- body, a, ul li a { font-family: <?php echo $data['hb_body_font']['face']; ?>; font-size: <?php echo $data['hb_body_font']['size']; ?> !important; color: <?php echo $data['hb_body_font']['color']; ?>; font-weight: <?php echo $data['hb_body_font']['style']; ?> !important; }
- h1 { font-family: <?php echo $data['hb_h1_font']['face']; ?>; font-size: <?php echo $data['hb_h1_font']['size']; ?> !important; color: <?php echo $data['hb_h1_font']['color']; ?>; font-weight: <?php echo $data['hb_h1_font']['style']; ?> !important; }
- h2 { font-family: <?php echo $data['hb_h2_font']['face']; ?>; font-size: <?php echo $data['hb_h2_font']['size']; ?> !important; color: <?php echo $data['hb_h2_font']['color']; ?>; font-weight: <?php echo $data['hb_h2_font']['style']; ?> !important; }
- h3 { font-family: <?php echo $data['hb_h3_font']['face']; ?>; font-size: <?php echo $data['hb_h3_font']['size']; ?> !important; color: <?php echo $data['hb_h3_font']['color']; ?>; font-weight: <?php echo $data['hb_h3_font']['style']; ?> !important; }
- h4 { font-family: <?php echo $data['hb_h4_font']['face']; ?>; font-size: <?php echo $data['hb_h4_font']['size']; ?> !important; color: <?php echo $data['hb_h5_font']['color']; ?>; font-weight: <?php echo $data['hb_h5_font']['style']; ?> !important; }
- h5 { font-family: <?php echo $data['hb_h5_font']['face']; ?>; font-size: <?php echo $data['hb_h5_font']['size']; ?> !important; color: <?php echo $data['hb_h5_font']['color']; ?>; font-weight: <?php echo $data['hb_h5_font']['style']; ?> !important; }
- h6 { font-family: <?php echo $data['hb_h6_font']['face']; ?>; font-size: <?php echo $data['hb_h6_font']['size']; ?> !important; color: <?php echo $data['hb_h6_font']['color']; ?>; font-weight: <?php echo $data['hb_h6_font']['style']; ?> !important; }
- #nav li a{ font-family: <?php echo $data['hb_nav_font']['face']; ?>; font-size: <?php echo $data['hb_nav_font']['size']; ?> !important; color: <?php echo $data['hb_nav_font']['color']; ?>; font-weight: <?php echo $data['hb_nav_font']['style']; ?> !important; }
- #footer, #footer ul, #main-sidebar, #mai-sidebar ul { font-family: <?php echo $data['hb_widget_font']['face']; ?>; font-size: <?php echo $data['hb_widget_font']['size']; ?> !important; color: <?php echo $data['hb_widget_font']['color']; ?>; font-weight: <?php echo $data['hb_widget_font']['style']; ?> !important; }
- <?php if( $data['hb_custom_font_import'] ) { echo $data['hb_custom_font_import']; } ?>
- </style>
- <!-- END Typography Styles -->
- <?php } ?>
- <!--[if IE]>
- <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/font-awesome-ie7.css" type="text/css" media="all"/>
- <![endif]-->
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <?php include ( HBTHEMES_INCLUDES . '/theme-options-styles.php' ); ?>
- <!-- Custom CSS -->
- <?php if ( $data['hb_custom_css_field'] ) { ?>
- <style type="text/css">
- <?php echo $data['hb_custom_css_field'] ; ?>
- </style>
- <?php } ?>
- <!-- Custom CSS END -->
- <?php wp_head(); ?>
- </head>
- <!-- END head -->
- <?php $body_kikkey = "";
- if ( $data['hb_include_to_top'] )
- $body_kikkey = "kikkey-top";
- ?>
- <!-- START body -->
- <body <?php body_class($body_kikkey); ?>>
- <?php add_background_image ( get_the_ID() ); ?>
- <!-- START #wrapper -->
- <div id="wrapper" class="<?php
- $space = "";
- if ( !$data['hb_enable_bottom_line'] ){
- echo 'hide-bottom-line ';
- }
- if ( !$data['hb_enable_main_shadow'] ){
- echo 'no-shadow-layout ';
- }
- echo $data['hb_choose_layout_type'] . ' ';
- if ( !is_page_title_enabled ( get_the_ID() ) ) {
- echo 'page-no-title';
- $space = " ";
- }
- $hb_page_sidebar_position = sanitize_title ( get_post_meta ( get_the_ID() , 'hb_page_sidebar_position' , true ) );
- if ( is_archive() || is_category() || is_tag() || is_search() || is_author() || is_attachment() ) {
- if ( strtolower ( $data['hb_archive_pages_sidebar_position'] ) != 'none' )
- $hb_page_sidebar_position = $data['hb_archive_pages_sidebar_position'];
- }
- if ( page_has_sidebar ( get_the_ID() ) ) echo $space.$hb_page_sidebar_position;
- ?>">
- <?php add_map_dropdown(); ?>
- <!-- START #content -->
- <div id="content">
- <!-- START #content-inner -->
- <div id="content-inner" class="container clearfix">
- <?php add_theme_header(); ?>
- <?php
- // check if landing page and main navigation is disabled
- if ( get_current_template() == "page-landing.php" ) {
- if ( get_post_meta ( get_the_ID() , 'hb_disable_main_navigation', true ) != "on" ){
- add_theme_main_nav();
- }
- }
- else
- add_theme_main_nav();
- ?>
- <?php add_header_separator( get_the_ID() ); ?>
- <?php add_page_featured_image_slider( get_the_ID() ); ?>
- <!-- START #main-content -->
- <div id="main-content" class="clearfix" >
- <!-- START #main-inner-wrapper -->
- <div id="main-inner-wrapper" class="col-12 clearfix<?php if ( page_has_sidebar( get_the_ID() ) ) echo ' page-with-sidebar'; ?>">
- <?php add_page_title( get_the_ID() ); ?>
- <?php if ( !page_has_sidebar( get_the_ID() ) ) { ?>
- <!-- START #fullwidth-wrapper -->
- <div id="fullwidth-wrapper" class="section clearfix">
- <?php } else { ?>
- <!-- START #sidebar-page-wrapper-->
- <div id="sidebar-page-wrapper" class="clearfix">
- <!-- START #main-content-with-sidebar" -->
- <div id="main-content-with-sidebar" class="col-8">
- <?php } ?>
- <?php if ( get_post_meta ( get_the_ID() , 'hb_include_breadcrumbs' , true ) || is_archive() || is_search() ) hbthemes_breadcrumbs(); ?>
|
le fichier footer.php
Code :
- <?php
- /**
- * @package WordPress
- * @subpackage Aegaeus
- */
- global $data;
- ?>
- <?php if ( !is_attachment() ) { ?>
- <?php if ( comments_open() ) { comments_template(); ?>
- <div class="spacer"></div>
- <?php } ?>
- <?php } ?>
- <?php if ( !page_has_sidebar( get_the_ID() ) ) { ?>
- </div>
- <!-- END #fullwidth-wrapper -->
- <?php } else { ?>
- </div>
- <!-- END #main-content-with-sidebar -->
- <!-- START #main-sidebar -->
- <div id="main-sidebar" class="col-4">
- <!-- START #main-sidebar-inner -->
- <div id="main-sidebar-inner">
- <?php
- if ( is_archive() || is_category() || is_tag() || is_search() || is_author() ) {
- dynamic_sidebar ( __('Default Sidebar' , 'hbthemes' ) );
- } else {
- dynamic_sidebar( get_post_meta ( get_the_ID() , 'hb_page_sidebar_name' , true ) );
- }
- ?>
- </div>
- <!-- END #main-sidebar-inner -->
- </div>
- <!-- END #main-sidebar -->
- </div>
- <!-- END #sidebar-page-wrapper -->
- <?php } ?>
- </div>
- <!-- END #main-inner-wrapper -->
- </div>
- <!-- END #main-content -->
- <!-- START #footer -->
- <?php $hb_footer_class = array(
- 'footer-style-01.png'=>array('1'=>'col-3', '2'=>'col-3', '3'=>'col-3', '4'=>'col-3'),
- 'footer-style-02.png'=>array('1'=>'col-3', '2'=>'col-3', '3'=>'col-6', '4'=>'hidden'),
- 'footer-style-03.png'=>array('1'=>'col-6', '2'=>'col-3', '3'=>'col-3', '4'=>'hidden'),
- 'footer-style-04.png'=>array('1'=>'col-3', '2'=>'col-6', '3'=>'col-3', '4'=>'hidden'),
- 'footer-style-05.png'=>array('1'=>'col-4', '2'=>'col-4', '3'=>'col-4', '4'=>'hidden'),
- 'footer-style-06.png'=>array('1'=>'col-8', '2'=>'col-4', '3'=>'hidden', '4'=>'hidden'),
- 'footer-style-07.png'=>array('1'=>'col-4', '2'=>'col-8', '3'=>'hidden', '4'=>'hidden'),
- 'footer-style-08.png'=>array('1'=>'col-6', '2'=>'col-6', '3'=>'hidden', '4'=>'hidden'),
- 'footer-style-09.png'=>array('1'=>'col-3', '2'=>'col-9', '3'=>'hidden', '4'=>'hidden'),
- 'footer-style-10.png'=>array('1'=>'col-9', '2'=>'col-3', '3'=>'hidden', '4'=>'hidden'),
- 'footer-style-11.png'=>array('1'=>'col-12', '2'=>'hidden', '3'=>'hidden', '4'=>'hidden'),
- );
- $hb_footer_style = $data['hb_footer_layout'];
- if ( !$hb_footer_style ) $hb_footer_style = 'footer-style-1.png';
- $hb_footer_class_id = "four-column-footer";
- switch ($hb_footer_style) {
- case 'footer-style-01.png':
- $hb_footer_class_id = "four-column-footer";
- break;
- case 'footer-style-02.png':
- $hb_footer_class_id = "three-column-footer";
- break;
- case 'footer-style-03.png':
- $hb_footer_class_id = "three-column-footer";
- break;
- case 'footer-style-04.png':
- $hb_footer_class_id = "three-column-footer";
- break;
- case 'footer-style-05.png':
- $hb_footer_class_id = "three-column-footer";
- break;
- case 'footer-style-06.png':
- $hb_footer_class_id = "two-column-footer";
- break;
- case 'footer-style-07.png':
- $hb_footer_class_id = "two-column-footer";
- break;
- case 'footer-style-08.png':
- $hb_footer_class_id = "two-column-footer";
- break;
- case 'footer-style-09.png':
- $hb_footer_class_id = "two-column-footer";
- break;
- case 'footer-style-10.png':
- $hb_footer_class_id = "two-column-footer";
- break;
- case 'footer-style-11.png':
- $hb_footer_class_id = "one-column-footer";
- break;
- }
- ?>
- <?php if ( $data['hb_disable_footer'] == false && ( get_current_template() != "page-landing.php" || ( get_current_template() == "page-landing.php" && get_post_meta ( get_the_ID() , 'hb_disable_footer_widgets' , true ) != "on" ) ) ){ ?>
- <div id="footer" class="<?php echo $hb_footer_class_id; ?>">
- <div class="arrow-down"></div>
- <!-- START #footer-inned -->
- <div id="footer-inner" class="container clearfix">
- <?php
- for( $i=1 ; $i<=4; $i++ ){
- echo '<div class="' . $hb_footer_class[$hb_footer_style][$i] . ' widget-column">';
- dynamic_sidebar('Footer ' . $i);
- echo '</div>';
- }
- ?>
- </div>
- <!-- END #footer-inner -->
- </div>
- <!-- END #footer -->
- <?php } ?>
- </div>
- <!-- END #content-inner -->
- </div>
- <!-- END #content -->
- <?php if ( $data['hb_disable_copyright_line'] == false ) { ?>
- <!-- START #bottom-line -->
- <div id="bottom-line" class="container clearfix">
- <div id="bottom-inner" class="col-12 clearfix">
- <div id="copyright-line">
- <?php echo $data['hb_copyright']; ?>
- </div>
- <?php
- // check if landing page and footer navigation is disabled
- if ( get_current_template() == "page-landing.php" ) {
- if ( get_post_meta ( get_the_ID() , 'hb_disable_footer_navigation', true ) != "on" )
- add_theme_footer_nav();
- } else {
- add_theme_footer_nav();
- }
- ?>
-
-
- </div>
- </div>
- <!-- END #bottom-line -->
- <?php } ?>
- </div>
- <!-- END #wrapper -->
- <?php if ( $data['hb_analytics_code'] ) { echo $data['hb_analytics_code']; } ?>
- <?php wp_footer(); ?>
- </body>
- <!-- END body -->
- </html>
- <!-- END html -->
|
le code du plugin mega menumenu verticale[b][/b] (que j'ai rajouter)
Code :
- <?php
- /*
- Plugin Name: jQuery Vertical Mega Menu
- Plugin URI: http://www.designchemical.com/blog [...] nu-widget/
- Tags: jquery, flyout, mega, menu, vertical, animated, css, navigation, widget
- Description: Creates a widget, which allows you to add vertical mega menus to your side columns using any Wordpress custom menu.
- Author: Lee Chestnutt
- Version: 1.3.3
- Author URI: http://www.designchemical.com
- */
- global $registered_skins;
- class dc_jqverticalmegamenu {
- function dc_jqverticalmegamenu(){
- global $registered_skins;
- if(!is_admin()){
- // Header styles
- add_action( 'wp_head', array('dc_jqverticalmegamenu', 'header') );
- }
- add_action( 'wp_footer', array('dc_jqverticalmegamenu', 'footer') );
- $registered_skins = array();
- }
- function header(){
- echo "\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"".dc_jqverticalmegamenu::get_plugin_directory()."/css/dcverticalmegamenu.css\" media=\"screen\" />";
- // Scripts
- wp_enqueue_script( 'jquery' );
- wp_enqueue_script( 'jqueryhoverintent', dc_jqverticalmegamenu::get_plugin_directory() . '/js/jquery.hoverIntent.minified.js', array('jquery') );
- wp_enqueue_script( 'dcjqverticalmegamenu', dc_jqverticalmegamenu::get_plugin_directory() . '/js/jquery.dcverticalmegamenu.1.3.js', array('jquery') );
- }
- function footer(){
- //echo "\n\t";
- }
- function options(){}
- function get_plugin_directory(){
- return WP_PLUGIN_URL . '/jquery-vertical-mega-menu';
- }
- };
- // Include the widget
- include_once('dcwp_jquery_vertical_mega_menu_widget.php');
- // Initialize the plugin.
- $dcjqverticalmegamenu = new dc_jqverticalmegamenu();
- // Register the widget
- add_action('widgets_init', create_function('', 'return register_widget("dc_jqverticalmegamenu_widget" );'));
- ?>
|
Merci Message édité par fly_in_the_sky le 04-04-2014 à 11:40:15
|