Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ************************************************* header.php ********************************************************
- <?php
- /**
- * The header for our theme
- *
- * This is the template that displays all of the <head> section and everything up until <div id="content">
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package mytheme
- */
- ?><!DOCTYPE html>
- <html <?php language_attributes(); ?>>
- <head>
- <meta charset="<?php bloginfo( 'charset' ); ?>">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="profile" href="http://gmpg.org/xfn/11">
- <?php wp_head(); ?>
- </head>
- <body <?php body_class(); ?>>
- <div id="page" class="site">
- <div class="header-top-area">
- <div class="container">
- <div class="row">
- <div class="col-md-6">
- <a href=""><i class="fa fa-envelope"></i>support@shape.com</a><span class="separator"> | </span>
- <a href=""><i class="fa fa-phone"></i>+324-4221-313</a><span class="separator"> | </span>
- <i class="fa fa-clock-o"></i><span>Mon - Fri, 9am - 5pm</span>
- </div>
- <div class="col-md-6 text-right"><p>We are giving professional services from last 20 years</p></div>
- </div>
- </div>
- </div>
- <div class="menu-area">
- <div class="container">
- <div class="row">
- <div class="col-md-3">
- <div class="site-logo">
- <a href="index.php"><h1>Factorian</h1></a>
- </div>
- </div>
- <div class="col-md-9">
- <div class="menu">
- <?php wp_nav_menu( array( 'theme_location' => 'menu-1', 'menu_id' => 'primary-menu' ) ); ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'mytheme' ); ?></a>
- <header id="masthead" class="site-header" role="banner">
- <div class="site-branding">
- <?php
- if ( is_front_page() && is_home() ) : ?>
- <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
- <?php else : ?>
- <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
- <?php
- endif;
- $description = get_bloginfo( 'description', 'display' );
- if ( $description || is_customize_preview() ) : ?>
- <p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
- <?php
- endif; ?>
- </div><!-- .site-branding -->
- <nav id="site-navigation" class="main-navigation" role="navigation">
- <button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'mytheme' ); ?></button>
- <?php wp_nav_menu( array( 'theme_location' => 'menu-1', 'menu_id' => 'primary-menu' ) ); ?>
- </nav><!-- #site-navigation -->
- </header><!-- #masthead -->
- <div id="content" class="site-content">
- ********************************************** footer.php ********************************************************
- <?php
- /**
- * The template for displaying the footer
- *
- * Contains the closing of the #content div and all content after.
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package mytheme
- */
- ?>
- <footer id="colophon" class="site-footer" role="contentinfo">
- <div class="container">
- <div class="footer-top">
- <?php if(is_active_sidebar('factorian_footer')) : ?>
- <div class="row">
- <?php dynamic_sidebar('factorian_footer');?>
- </div>
- <?php endif;?>
- </div>
- </div>
- </footer>
- <div class="footer-bottom">
- <div class="container">
- <div class="row">
- <div class="col-md-12">
- <div class="fac-footer-bottom">
- <p>© 2016 Your Site Name. </p>
- </div>
- </div>
- </div>
- </div>
- </div><!-- #colophon -->
- </div><!-- #page -->
- <?php wp_footer(); ?>
- </body>
- </html>
- ********************************************** function.php *******************************************************
- function mytheme_widgets_init() {
- register_sidebar( array(
- 'name' => esc_html__( 'Sidebar', 'mytheme' ),
- 'id' => 'sidebar-1',
- 'description' => esc_html__( 'Add widgets here.', 'mytheme' ),
- 'before_widget' => '<section id="%1$s" class="widget %2$s">',
- 'after_widget' => '</section>',
- 'before_title' => '<h2 class="widget-title">',
- 'after_title' => '</h2>',
- ) );
- register_sidebar( array(
- 'name' => esc_html__( 'Footer widgets', 'mytheme' ),
- 'id' => 'factorian_footer',
- 'description' => esc_html__( 'Add footer widgets here.', 'mytheme' ),
- 'before_widget' => '<div class="col-md-3"><div id="%1$s" class="widget %2$s">',
- 'after_widget' => '</div></div>',
- 'before_title' => '<h4 class="widget-title">',
- 'after_title' => '</h4>',
- ) );
- }
- add_action( 'widgets_init', 'mytheme_widgets_init' );
- /**
- * Enqueue scripts and styles.
- */
- function mytheme_scripts() {
- wp_enqueue_style( 'factorian-default', get_template_directory_uri() . '/assets/css/default.css', array(), '1.0');
- wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css', array(), '3.3.7');
- wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/assets/css/font-awesome.min.css', array(), '4.7');
- wp_enqueue_style( 'mytheme-style', get_stylesheet_uri() );
- wp_enqueue_script( 'mytheme-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );
- wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array('jquery'), '20151215', true );
- if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
- wp_enqueue_script( 'comment-reply' );
- }
- }
- add_action( 'wp_enqueue_scripts', 'mytheme_scripts' );
Add Comment
Please, Sign In to add comment