nazim259

Untitled

Apr 24th, 2017
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.79 KB | None | 0 0
  1. ************************************************* header.php ********************************************************
  2.  
  3. <?php
  4. /**
  5. * The header for our theme
  6. *
  7. * This is the template that displays all of the <head> section and everything up until <div id="content">
  8. *
  9. * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
  10. *
  11. * @package mytheme
  12. */
  13.  
  14. ?><!DOCTYPE html>
  15. <html <?php language_attributes(); ?>>
  16. <head>
  17. <meta charset="<?php bloginfo( 'charset' ); ?>">
  18. <meta name="viewport" content="width=device-width, initial-scale=1">
  19. <link rel="profile" href="http://gmpg.org/xfn/11">
  20.  
  21. <?php wp_head(); ?>
  22. </head>
  23.  
  24. <body <?php body_class(); ?>>
  25. <div id="page" class="site">
  26.  
  27.  
  28. <div class="header-top-area">
  29. <div class="container">
  30. <div class="row">
  31. <div class="col-md-6">
  32. <a href=""><i class="fa fa-envelope"></i>support@shape.com</a><span class="separator"> | </span>
  33. <a href=""><i class="fa fa-phone"></i>+324-4221-313</a><span class="separator"> | </span>
  34. <i class="fa fa-clock-o"></i><span>Mon - Fri, 9am - 5pm</span>
  35. </div>
  36. <div class="col-md-6 text-right"><p>We are giving professional services from last 20 years</p></div>
  37. </div>
  38. </div>
  39. </div>
  40.  
  41. <div class="menu-area">
  42. <div class="container">
  43. <div class="row">
  44. <div class="col-md-3">
  45. <div class="site-logo">
  46. <a href="index.php"><h1>Factorian</h1></a>
  47. </div>
  48. </div>
  49. <div class="col-md-9">
  50. <div class="menu">
  51. <?php wp_nav_menu( array( 'theme_location' => 'menu-1', 'menu_id' => 'primary-menu' ) ); ?>
  52. </div>
  53.  
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58.  
  59.  
  60.  
  61. <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'mytheme' ); ?></a>
  62.  
  63. <header id="masthead" class="site-header" role="banner">
  64. <div class="site-branding">
  65. <?php
  66. if ( is_front_page() && is_home() ) : ?>
  67. <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
  68. <?php else : ?>
  69. <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
  70. <?php
  71. endif;
  72.  
  73. $description = get_bloginfo( 'description', 'display' );
  74. if ( $description || is_customize_preview() ) : ?>
  75. <p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
  76. <?php
  77. endif; ?>
  78. </div><!-- .site-branding -->
  79.  
  80. <nav id="site-navigation" class="main-navigation" role="navigation">
  81. <button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'mytheme' ); ?></button>
  82. <?php wp_nav_menu( array( 'theme_location' => 'menu-1', 'menu_id' => 'primary-menu' ) ); ?>
  83. </nav><!-- #site-navigation -->
  84. </header><!-- #masthead -->
  85.  
  86. <div id="content" class="site-content">
  87.  
  88.  
  89.  
  90.  
  91. ********************************************** footer.php ********************************************************
  92.  
  93. <?php
  94. /**
  95. * The template for displaying the footer
  96. *
  97. * Contains the closing of the #content div and all content after.
  98. *
  99. * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
  100. *
  101. * @package mytheme
  102. */
  103.  
  104. ?>
  105.  
  106.  
  107. <footer id="colophon" class="site-footer" role="contentinfo">
  108. <div class="container">
  109. <div class="footer-top">
  110. <?php if(is_active_sidebar('factorian_footer')) : ?>
  111. <div class="row">
  112. <?php dynamic_sidebar('factorian_footer');?>
  113. </div>
  114. <?php endif;?>
  115. </div>
  116.  
  117. </div>
  118. </footer>
  119. <div class="footer-bottom">
  120. <div class="container">
  121. <div class="row">
  122. <div class="col-md-12">
  123. <div class="fac-footer-bottom">
  124. <p>© 2016 Your Site Name. </p>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </div><!-- #colophon -->
  130. </div><!-- #page -->
  131.  
  132. <?php wp_footer(); ?>
  133.  
  134. </body>
  135. </html>
  136.  
  137.  
  138. ********************************************** function.php *******************************************************
  139.  
  140. function mytheme_widgets_init() {
  141. register_sidebar( array(
  142. 'name' => esc_html__( 'Sidebar', 'mytheme' ),
  143. 'id' => 'sidebar-1',
  144. 'description' => esc_html__( 'Add widgets here.', 'mytheme' ),
  145. 'before_widget' => '<section id="%1$s" class="widget %2$s">',
  146. 'after_widget' => '</section>',
  147. 'before_title' => '<h2 class="widget-title">',
  148. 'after_title' => '</h2>',
  149. ) );
  150. register_sidebar( array(
  151. 'name' => esc_html__( 'Footer widgets', 'mytheme' ),
  152. 'id' => 'factorian_footer',
  153. 'description' => esc_html__( 'Add footer widgets here.', 'mytheme' ),
  154. 'before_widget' => '<div class="col-md-3"><div id="%1$s" class="widget %2$s">',
  155. 'after_widget' => '</div></div>',
  156. 'before_title' => '<h4 class="widget-title">',
  157. 'after_title' => '</h4>',
  158. ) );
  159. }
  160. add_action( 'widgets_init', 'mytheme_widgets_init' );
  161.  
  162. /**
  163. * Enqueue scripts and styles.
  164. */
  165. function mytheme_scripts() {
  166.  
  167. wp_enqueue_style( 'factorian-default', get_template_directory_uri() . '/assets/css/default.css', array(), '1.0');
  168. wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css', array(), '3.3.7');
  169. wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/assets/css/font-awesome.min.css', array(), '4.7');
  170.  
  171. wp_enqueue_style( 'mytheme-style', get_stylesheet_uri() );
  172.  
  173. wp_enqueue_script( 'mytheme-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );
  174.  
  175. wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array('jquery'), '20151215', true );
  176.  
  177. if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
  178. wp_enqueue_script( 'comment-reply' );
  179. }
  180. }
  181. add_action( 'wp_enqueue_scripts', 'mytheme_scripts' );
Add Comment
Please, Sign In to add comment