Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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 seo
- */
- ?>
- <!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
- $header_iconic_boxes = cs_get_option('header_iconic_boxes');
- $social_links = cs_get_option('social_links');
- $enable_image_logo = cs_get_option('enable_image_logo');
- $image_logo = cs_get_option('image_logo');
- $image_logo_max_height = cs_get_option('image_logo_max_height');
- $text_logo = cs_get_option('text_logo');
- wp_head(); ?>
- </head>
- <body <?php body_class(); ?>>
- <div id="page" class="site">
- <div class="header-area">
- <div class="header-top">
- <div class="container">
- <div class="row">
- <div class="col-md-6">
- <?php if(!empty($social_links)) : ?>
- <div class="social-links">
- <?php foreach($social_links as $link) : ?>
- <a href="<?php echo $link['link']?>" target="_blank"><i class="<?php echo $link['social_icon']?>"></i></a><span class="seperator">|</span>
- <?php endforeach; ?>
- </div>
- <?php endif; ?>
- </div>
- <div class="col-md-6">
- <?php if(!empty($header_iconic_boxes)) : ?>
- <div class="quick-contact text-right">
- <?php foreach($header_iconic_boxes as $box) : ?>
- <?php if(!empty($box['link'])) : ?>
- <a href="<?php echo $box['link']; ?>" <?php else : ?>
- <?php endif; ?>>
- <i class="<?php echo $box['icon']; ?>"></i>
- <?php echo $box['title']; ?>
- </a><span class="separator">|</span>
- <?php if(!empty($box['link'])) : ?>
- </a>
- <?php else : ?>
- <?php endif;?>
- <?php endforeach; ?>
- </div>
- <?php endif; ?>
- <!--<a href="tel:+22 666-888-999"><i class="fa fa-phone"></i>+22 666-888-999</a><span class="separator">|</span>
- <a href="mailto:seoexpert@gmail.com"><i class="fa fa-envelope"></i>seoexpert@gmail.com</a>-->
- </div>
- </div>
- </div>
- </div>
- <div class="header-bottom">
- <div class="container">
- <div class="row">
- <div class="col-md-2">
- <div class="site-logo">
- <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
- <?php if( $enable_image_logo == true && !empty ($image_logo) ) : $image_logo_src = wp_get_attachment_image_src ($image_logo, 'large', false); ?>
- <img style="max-height:<?php echo $image_logo_max_height; ?>px" src="<?php echo $image_logo_src[0]; ?>" alt="<?php echo bloginfo( 'name' ) ?>">
- <?php else : ?>
- <?php if(!empty ($text_logo) ) {echo $text_logo;} else {bloginfo( 'name' );} ?>
- <?php endif; ?>
- </a>
- </div>
- </div>
- <div class="col-md-10">
- <div class="main-menu text-right">
- <?php wp_nav_menu( array(
- 'theme_location' => 'menu-1',
- 'menu_id' => 'primary-menu',
- )
- ); ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- //-------------- theme options------------ //
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
- function seo_theme_option_settings( $settings ){
- $settings = array();
- $settings = array(
- 'menu_title' => 'Theme Options',
- 'menu_type' => 'menu', // menu, submenu, options, theme, etc.
- 'menu_slug' => 'seo-framework',
- 'ajax_save' => true,
- 'show_reset_all' => true,
- 'framework_title' => 'seo Framework <small>by seo</small>',
- );
- return $settings;
- }
- add_filter('cs_framework_settings', 'seo_theme_option_settings');
- function seo_theme_metabox( $options ){
- $options = array(); // remove old options
- // -----------------------------------------
- // Page Metabox Options -
- // -----------------------------------------
- $options[] = array(
- 'id' => 'seo_page_options',
- 'title' => 'Page Options',
- 'post_type' => 'page',
- 'context' => 'normal',
- 'priority' => 'high',
- 'sections' => array(
- // begin: a section
- array(
- 'name' => 'seo_page_options_meta',
- 'icon' => 'fa fa-cog',
- // begin: fields
- 'fields' => array(
- array(
- 'id' => 'enable_title',
- 'type' => 'switcher',
- 'title' => 'enable title?',
- 'default' => true,
- 'desc' => esc_html__('if you want to enable title, select yes', 'seo-infinityy')
- ),
- array(
- 'id' => 'custom_title',
- 'type' => 'text',
- 'title' => 'custom title?',
- 'dependency' => array('enable_title', '==', 'true'),
- 'desc' => esc_html__('if you want to enable title, select yes', 'seo-infinityy')
- ),
- ),
- ),
- ),
- );
- // -----------------------------------------
- // Slide Options -
- // -----------------------------------------
- $options[] = array(
- 'id' => 'seo_slider_options',
- 'title' => 'Slider Options',
- 'post_type' => 'slider',
- 'context' => 'normal',
- 'priority' => 'high',
- 'sections' => array(
- // begin: a section
- array(
- 'name' => 'seo_slider_options_meta',
- // begin: fields
- 'fields' => array(
- array(
- 'id' => 'buttons',
- 'type' => 'group',
- 'title' => 'Slider button',
- 'button_title' => 'Add New',
- 'accordion_title' => 'Add New Button',
- 'fields' => array(
- array(
- 'id' => 'type',
- 'type' => 'select',
- 'title' => 'button type',
- 'options' => array(
- 'Bordred' => 'Borderred button',
- 'Filled' => 'Filled button',
- ),
- ),
- array(
- 'id' => 'text',
- 'type' => 'text',
- 'title' => 'Button Ext',
- 'default' => 'get started'
- ),
- array(
- 'id' => 'link_type',
- 'type' => 'select',
- 'title' => 'link type',
- 'options' => array(
- '1' => 'wordpress page',
- '2' => 'External link',
- ),
- ),
- array(
- 'id' => 'link_to_page',
- 'type' => 'select',
- 'title' => 'select page',
- 'options' => 'page',
- 'dependency' => array('link_type', '==', '1'),
- ),
- array(
- 'id' => 'link_to_external',
- 'type' => 'text',
- 'title' => 'Type url',
- 'dependency' => array('link_type', '==', '2'),
- ),
- ),
- ),
- array(
- 'id' => 'enable_overlay',
- 'type' => 'switcher',
- 'title' => 'Enable Overlay ?',
- 'default' => true,
- 'label' => 'Do you want to it ?',
- ),
- array(
- 'id' => 'overlay_percentage',
- 'type' => 'text',
- 'title' => 'Overlay percentage',
- 'default' => '.7',
- 'desc' => 'type overlay percentage in number',
- 'dependency' => array( 'enable_overlay', '==', 'true' ),
- ),
- array(
- 'id' => 'overlay_color',
- 'type' => 'color_picker',
- 'title' => 'Overlay color',
- 'default' => '#999',
- 'desc' => 'select overlay color',
- 'dependency' => array( 'enable_overlay', '==', 'true' ),
- ),
- array(
- 'id' => 'title_spcl',
- 'type' => 'text',
- 'title' => 'Colored Title',
- 'default' => 'we measure',
- 'desc' => 'type colored text of title',
- ),
- array(
- 'id' => 'sub_title',
- 'type' => 'text',
- 'title' => 'subtitle text',
- 'default' => 'Exceptional result',
- 'desc' => 'Type subtitle text',
- ),
- ),
- ),
- ),
- );
- return $options;
- }
- add_filter('cs_metabox_options', 'seo_theme_metabox');
- function seo_theme_options ($options){
- $options = array(); // remove old theme options
- $options[] = array(
- 'name' => 'seo_infinityy_header_section',
- 'title' => 'header Section',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'header_iconic_boxes',
- 'type' => 'group',
- 'title' => 'Iconic boxes',
- 'desc' => 'If you want to show iconic boxes in header section',
- 'button_title' => 'Add New',
- 'accordion_title' => 'Add New box',
- 'fields' => array(
- array(
- 'id' => 'icon',
- 'type' => 'icon',
- 'title' => 'box icon',
- ),
- array(
- 'id' => 'title',
- 'type' => 'text',
- 'title' => 'box title',
- ),
- array(
- 'id' => 'link',
- 'type' => 'text',
- 'title' => 'box link',
- 'desc' => 'leave blank if you do not want a link',
- ),
- ),
- ),
- )
- );
- $options[] = array(
- 'name' => 'seo_infinityy_social_link_section',
- 'title' => 'social link Section',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'social_links',
- 'type' => 'group',
- 'title' => 'social links',
- 'button_title' => 'Add New',
- 'accordion_title' => 'Add New link',
- 'fields' => array(
- array(
- 'id' => 'social_icon',
- 'type' => 'icon',
- 'title' => 'social icon',
- ),
- array(
- 'id' => 'link',
- 'type' => 'text',
- 'title' => 'social link',
- ),
- ),
- ),
- )
- );
- $options[] = array(
- 'name' => 'seo_infinityy_logo_section',
- 'title' => 'logo Section',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'enable_image_logo',
- 'type' => 'switcher',
- 'title' => 'enable image logo',
- 'default' => true,
- ),
- array(
- 'id' => 'image_logo',
- 'type' => 'image',
- 'title' => 'upload image logo',
- 'dependency' => array('enable_image_logo', '==', 'true'),
- ),
- array(
- 'id' => 'image_logo_max_height',
- 'type' => 'text',
- 'default' => '100',
- 'title' => 'logo maximum height',
- 'desc' => 'type logo maximum height in px',
- 'dependency' => array('enable_image_logo', '==', 'true'),
- ),
- array(
- 'id' => 'text_logo',
- 'type' => 'text',
- 'title' => 'logo text',
- 'default' => 'seo',
- 'dependency' => array('enable_image_logo', '==', 'false'),
- ),
- )
- );
- $options[] = array(
- 'name' => 'seo_infinityy_typography_section',
- 'title' => 'typography Section',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'body_font',
- 'type' => 'typography',
- 'title' => 'body font',
- 'default' => array(
- 'family' => 'Roboto',
- 'variant' => '400',
- 'font' => 'google', // this is helper for output
- ),
- ),
- array(
- 'id' => 'heading_font',
- 'type' => 'typography',
- 'title' => 'heading font',
- 'default' => array(
- 'family' => 'Noto Serif',
- 'variant' => '700',
- 'font' => 'google', // this is helper for output
- ),
- ),
- )
- );
- $options[] = array(
- 'name' => 'seo_infinityy_styling_section',
- 'title' => 'styling Section',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'enable_preloader',
- 'type' => 'switcher',
- 'title' => 'enable preloaer',
- 'default' => true,
- ),
- array(
- 'id' => 'enable_boxed_layout',
- 'type' => 'switcher',
- 'title' => 'enable box layout',
- 'default' => false
- ),
- array(
- 'id' => 'body_bg',
- 'type' => 'image',
- 'title' => 'body background image',
- 'dependency' => array('enable_boxed_layout', '==', 'false'),
- ),
- array(
- 'id' => 'body_bg_repeat',
- 'type' => 'select',
- 'default' => 'repeat',
- 'options' => array(
- 'repeat' => 'repeat',
- 'no-repeat' => 'no-repeat',
- 'cover' => 'Cover',
- ),
- 'title' => 'body background image repeat',
- 'dependency' => array('enable_boxed_layout', '==', 'false'),
- ),
- array(
- 'id' => 'body_bg_attachment',
- 'type' => 'select',
- 'options' => array(
- 'scroll' => 'Scroll',
- 'fixed' => 'Fixed',
- ),
- 'title' => 'body background attachment',
- 'dependency' => array('enable_boxed_layout', '==', 'false'),
- ),
- )
- );
- $options[] = array(
- 'name' => 'seo_infinityy_blog_section',
- 'title' => 'blog Section',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'display_post_by',
- 'type' => 'switcher',
- 'title' => 'Display post by?',
- 'default' => true,
- ),
- array(
- 'id' => 'display_post_date',
- 'type' => 'switcher',
- 'title' => 'Display post date?',
- 'default' => true,
- ),
- array(
- 'id' => 'display_post_comment',
- 'type' => 'switcher',
- 'title' => 'Display post comment count?',
- 'default' => true,
- ),
- array(
- 'id' => 'display_post_category',
- 'type' => 'switcher',
- 'title' => 'Display posted in categories?',
- 'default' => true,
- ),
- array(
- 'id' => 'display_post_tag',
- 'type' => 'switcher',
- 'title' => 'Display posted in tag?',
- 'default' => true,
- ),
- array(
- 'id' => 'display_post_nav',
- 'type' => 'switcher',
- 'title' => 'Enable next prev nav link on single page?',
- 'default' => true,
- ),
- )
- );
- $options[] = array(
- 'name' => 'seo_infinityy_footer_section',
- 'title' => 'footer Section',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'footer_bg',
- 'type' => 'color_picker',
- 'title' => 'footer background color?',
- 'default' => '#333',
- ),
- array(
- 'id' => 'footer_bg_image',
- 'type' => 'image',
- 'title' => 'footer background image?',
- 'dependency' => array('footer_bg', '==', 'false'),
- ),
- array(
- 'id' => 'footer_bg_repeat',
- 'type' => 'select',
- 'default' => 'repeat',
- 'options' => array(
- 'repeat' => 'repeat',
- 'no-repeat' => 'no-repeat',
- 'cover' => 'Cover',
- ),
- 'title' => 'footer background image repeat',
- 'dependency' => array('footer_bg', '==', 'false'),
- ),
- array(
- 'id' => 'footer_bg_attachment',
- 'type' => 'select',
- 'options' => array(
- 'scroll' => 'Scroll',
- 'fixed' => 'Fixed',
- ),
- 'title' => 'footer background attachment',
- 'dependency' => array('footer_bg', '==', 'false'),
- ),
- array(
- 'id' => 'footer_heading_text',
- 'type' => 'color_picker',
- 'title' => 'footer heading text color?',
- 'default' => '#fff',
- ),
- array(
- 'id' => 'footer_copyright_text',
- 'type' => 'textarea',
- 'title' => 'footer copyright text',
- 'default' => 'Copyright2016, All Rights Reserved',
- ),
- )
- );
- $options[] = array(
- 'name' => 'seo_infinityy_scripts_section',
- 'title' => 'scripts Section',
- 'icon' => 'fa fa-heart',
- 'fields' => array(
- array(
- 'id' => 'head_scripts',
- 'type' => 'textarea',
- 'title' => 'head scripts',
- 'sanitize' => false,
- 'desc' => 'head scripts goes before closing </ head >',
- ),
- array(
- 'id' => 'body_start_scripts',
- 'type' => 'textarea',
- 'title' => 'body start scripts',
- 'sanitize' => false,
- 'desc' => 'body scripts goes just after < body > starts',
- ),
- array(
- 'id' => 'body_end_scripts',
- 'type' => 'textarea',
- 'title' => 'footer scripts',
- 'sanitize' => false,
- 'desc' => 'body scripts goes just before < /body >',
- ),
- )
- );
- return $options;
- }
- add_filter('cs_framework_options', 'seo_theme_options');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement