Example #1
0
/**
 * Inject Customizer CSS when appropriate
 */
function popper_customize_css()
{
    $header_color = get_theme_mod('header_color');
    if ($header_color && $header_color != "#000000") {
        ?>
         <style type="text/css">
             .site-header {
				 background-color:<?php 
        echo $header_color;
        ?>
;
			 }
         </style>
    <?php 
    }
    if ($header_color == '#ffffff' && !get_header_image()) {
        ?>
		<style type="text/css">
			.main-navigation {
				background-color: transparent;
			}

			@media screen and (min-width: 50em) {

				.main-navigation.toggled {
					background-color: transparent;
				}

				.main-navigation a,
				.main-navigation a:hover,
				.main-navigation a:focus,
				.dropdown-toggle {
					color: #000;
					outline-color: #000;
				}

				.dropdown-toggle {
					background-color: transparent;
				}

				.dropdown-toggle:hover,
				.dropdown-toggle:focus {
					background-color: #fff;
					outline: 1px solid #000;
				}

				.main-navigation ul ul a,
				ul ul .dropdown-toggle {
					color: #fff;
				}

				.main-navigation ul ul a:hover,
				.main-navigation ul ul a:focus {
					outline-color: #B3B3B3;
				}
			}
		</style>
	<?php 
    }
}
Example #2
0
function kkthemes_archive_title()
{
    $tag_style = '';
    $header_image = get_header_image();
    if (!empty($header_image)) {
        $tag_style = 'background-image: url(' . esc_url($header_image) . ');';
    }
    ?>
	<div class="uk-panel uk-panel-box uk-panel-space uk-text-large uk-text-center tm-branded-panel uk-margin-large-bottom" style="<?php 
    echo $tag_style;
    ?>
">
		<h1 class="uk-article-title" itemprop="headline">
			<?php 
    single_cat_title('') || post_type_archive_title('');
    ?>
		</h1>
		<?php 
    if (is_featured_item()) {
        $post_type = get_post_type();
        echo '<p>' . get_post_type_object($post_type)->description . '</p>';
    } else {
        echo category_description();
    }
    ?>
	</div>
<?php 
}
/**
 * Add custom header (not mobi)
 *
 * v2.2 fixed header height issue
 * 
 * @author Tim Bednar 
 * @version v2.0
 * @since v2.0
*/
function ashford_header_style()
{
    global $ashfordtheme;
    if (isset($ashfordtheme->option['display_blog_name'])) {
        $display_blog_name = $ashfordtheme->option['display_blog_name'];
    } else {
        // display custom header by default
        $display_blog_name = 'titleoff';
    }
    $ashford_logo_height = '100px';
    if (isset($ashfordtheme->option['logo_height'])) {
        if ($ashfordtheme->option['logo_height'] != '') {
            $ashford_logo_height = $ashfordtheme->option['logo_height'];
        }
    }
    $header_image = get_header_image();
    if (!empty($header_image) && $display_blog_name == 'titleoff' && IS_MOBI == 'false') {
        ?>
<style type="text/css">#blog_logo{background-image:url(<?php 
        header_image();
        ?>
);background-repeat:no-repeat;backgroud-position:top left;height:<?php 
        echo $ashford_logo_height;
        ?>
;padding:0px}</style><?php 
    }
}
Example #4
0
/**
 * Add header image to css
 * Allow the use of admin defined header image
 *
 * TODO : use different image for each screen size
 */
function add_styles()
{
    ?>
	<style type="text/css">
	@media (max-width: 512px)  and (min-resolution: 1.5dppx),
       (max-width: 1024px) and (max-resolution: 1.5dppx) {
	 	body::before {
	    background-image: url('<?php 
    echo get_header_image();
    ?>
');
	  }
	}
	@media (min-width: 513px)  and (max-width: 1024px) and (min-resolution: 1.5dppx),
	       (min-width: 1025px) and (max-width: 2048px) and (max-resolution: 1.5dppx)  {
	  body::before {
	    background-image: url('<?php 
    echo get_header_image();
    ?>
');
	  }
	}
	@media (min-width: 1025px) and (min-resolution: 1.5dppx),
	       (min-width: 2049px) and (max-resolution: 1.5dppx) {
	  body::before {
	    background-image: url('<?php 
    echo get_header_image();
    ?>
');
	  }
	}
	</style>
	<?php 
}
/**
 * Add custom header image to header area
 */
function argent_header_background()
{
    if (get_header_image()) {
        $css = '.site-branding { background-image: url(' . esc_url(get_header_image()) . '); }';
        wp_add_inline_style('argent-style', $css);
    }
}
Example #6
0
/**
 * Customize Breadcrumd with Background Color Or Background Images
 */
function training_wpo_layout_breadcrumbs_bg()
{
    $customize_image = get_header_image();
    if (isset($trainingconfig['background_breadcrumb']) && $trainingconfig['background_breadcrumb']) {
        switch ($trainingconfig['background_breadcrumb']) {
            case 'bg_image':
                $style = 'background-image: url(' . esc_url_raw($trainingconfig['image_breadcrumb']) . ');';
                break;
            case 'bg_color':
                $style = 'background-color:' . esc_attr($trainingconfig['bg_color']);
                break;
            case 'global':
                if ($customize_image) {
                    $style = "background: url('" . esc_url_raw($customize_image) . "') no-repeat center center #f9f9f9";
                    break;
                }
            default:
                $style = "background: url('" . get_template_directory_uri() . "/images/breadcrumb.jpg') no-repeat center center #f9f9f9";
                break;
        }
    } elseif (isset($customize_image) && !empty($customize_image)) {
        $style = "background: url('" . esc_url_raw($customize_image) . "') no-repeat center center #f9f9f9";
    } else {
        $style = "background: url('" . get_template_directory_uri() . "/images/breadcrumb.jpg') no-repeat center center #f9f9f9";
    }
    return $style;
}
    /**
     * Shows the small info text on top header part
     */
    function colormag_render_header_image()
    {
        $header_image = get_header_image();
        if (!empty($header_image)) {
            if (get_theme_mod('colormag_header_image_link', 0) == 1) {
                ?>
		<a href="<?php 
                echo esc_url(home_url('/'));
                ?>
" title="<?php 
                echo esc_attr(get_bloginfo('name', 'display'));
                ?>
" rel="home">
		<?php 
            }
            ?>
		<div class="header-image-wrap"><img src="http://thevrforums.com/images/banner.png" class="header-image" width="<?php 
            echo get_custom_header()->width;
            ?>
" height="<?php 
            echo get_custom_header()->height;
            ?>
" alt="<?php 
            echo esc_attr(get_bloginfo('name', 'display'));
            ?>
"></div>
	<?php 
            if (get_theme_mod('colormag_header_image_link', 0) == 1) {
                ?>
		</a>
		<?php 
            }
        }
    }
Example #8
0
 function xsbf_body_classes($classes)
 {
     // Adds a class of group-blog to blogs with more than 1 published author
     if (is_multi_author()) {
         $classes[] = 'group-blog';
     }
     // Adds classes for various sizes of featured images. Our theme overrides the
     // custom header with a large featured image.
     if (has_post_thumbnail()) {
         $classes[] = 'featured-image';
         global $post, $content_width;
         $featured_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
         $image_width = $featured_image[1];
         if ($content_width and $image_width >= $content_width) {
             if (is_home()) {
                 $classes[] = 'has-cover-image';
             } else {
                 $classes[] = 'has-section-image';
             }
             //endif is_home
         }
         //endif $content_width
         // If custom header and not overridden, then add class for that
     } elseif (get_header_image()) {
         $classes[] = 'has-header-image';
     }
     //endif has_post_thumbnail
     return $classes;
 }
/**
 * Register a custom admin callback to display the custom header preview with the
 * same style as is shown on the front end.
 *
 */
function minimum_admin_style()
{
    $headimg = sprintf('.appearance_page_custom-header #headimg { background: url(%s) no-repeat; font-family: Oswald, arial, serif; min-height: %spx; }', get_header_image(), HEADER_IMAGE_HEIGHT);
    $h1 = sprintf('#headimg h1, #headimg h1 a { color: #%s; font-size: 48px; font-weight: normal; line-height: 48px; margin: 25px 0 0; text-decoration: none; }', esc_html(get_header_textcolor()));
    $desc = sprintf('#headimg #desc { color: #%s; display: none; }', esc_html(get_header_textcolor()));
    printf('<style type="text/css">%1$s %2$s %3$s</style>', $headimg, $h1, $desc);
}
/**
 * Styling included at the top of the site page for a custom header.
 * 
 * @author StudioPress
 */
function prose_custom_header_style()
{
    if (get_header_image()) {
        ?>
<!-- custom-header styling --><style type="text/css">
#header{background:url(<?php 
        header_image();
        ?>
) scroll no-repeat 0 0;}
<?php 
        if (get_theme_mod('header_textcolor') && get_theme_mod('header_textcolor') != 'blank') {
            ?>
#title-area #title a, #title-area #title a:hover{color:#<?php 
            header_textcolor();
            ?>
;}
#title-area #description{color: #<?php 
            header_textcolor();
            ?>
;}
<?php 
        }
        ?>
</style>
<?php 
    }
}
function onetone_custom_scripts()
{
    wp_enqueue_style('onetone-font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', false, '4.0.3', false);
    wp_enqueue_style('onetone-main', get_stylesheet_uri(), array(), '1.2.8');
    wp_enqueue_style('Yanone-Kaffeesatz', esc_url('//fonts.googleapis.com/css?family=Yanone+Kaffeesatz|Lustria|Raleway|Open+Sans:400,300'), false, '', false);
    $background_array = onetone_options_array("page_background");
    $background = onetone_get_background($background_array);
    $header_image = get_header_image();
    $onetone_custom_css = "";
    if (isset($header_image) && !empty($header_image)) {
        $onetone_custom_css .= ".home-header{background:url(" . $header_image . ") repeat;}\n";
    }
    if ('blank' != get_header_textcolor() && '' != get_header_textcolor()) {
        $header_color = ' color:#' . get_header_textcolor() . ';';
        $onetone_custom_css .= '.home-header,.site-name,.site-description{' . $header_color . '}';
    }
    $custom_css = onetone_options_array("custom_css");
    $onetone_custom_css .= '.site{' . $background . '}';
    $top_menu_font_color = onetone_options_array('font_color');
    if ($top_menu_font_color != "" && $top_menu_font_color != null) {
        $onetone_custom_css .= 'header #menu-main > li > a span,header .top-nav > ul > li > a span{color:' . $top_menu_font_color . '}';
    }
    $onetone_custom_css .= $custom_css;
    wp_add_inline_style('onetone-main', $onetone_custom_css);
    if (is_home()) {
        wp_enqueue_script('onetone-bigvideo', get_template_directory_uri() . '/js/jquery.tubular.1.0.js', array('jquery'), '1.0', true);
    }
    wp_enqueue_script('onetone-modernizr', get_template_directory_uri() . '/js/modernizr.custom.js', array('jquery'), '2.8.2 ', false);
    wp_enqueue_script('onetone-unslider', get_template_directory_uri() . '/js/unslider.js', array('jquery'), '1.0.0 ', true);
    wp_enqueue_script('onetone-default', get_template_directory_uri() . '/js/onetone.js', array('jquery'), '1.2.8', true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_localize_script('onetone-default', 'onetone_params', array('ajaxurl' => admin_url('admin-ajax.php'), 'themeurl' => get_template_directory_uri()));
}
Example #12
0
    function the_header()
    {
        $text = '';
        $image = get_header_image();
        $text = '
			<div id="site-heading">
				<h1 class="site-title"><a href="' . esc_url(home_url('/')) . '">' . get_bloginfo('name') . '</a></h1>
				<div class="site-description">' . get_bloginfo('description') . '</div>
			</div>';
        if ($image) {
            $image = '<img src="' . esc_url($image) . '" />';
            if (!display_header_text()) {
                $image = '<a href="' . esc_url(home_url('/')) . '">' . $image . '</a>';
            }
            $image = '<div id="site-image">' . $image . '</div>';
        }
        // Allow plugins/themes to override the default header.
        $output = apply_filters('fastfood_header', $text . $image);
        ?>

			<div id="site-header" role="banner">

				<?php 
        echo $output;
        ?>

			</div>

		<?php 
    }
Example #13
0
 /**
  * Styles the header image and text displayed on the blog
  *
  * @see chuchadon_custom_header_setup().
  */
 function chuchadon_header_style()
 {
     /* Header text color. */
     $header_color = get_header_textcolor();
     /* Header image. */
     $header_image = esc_url(get_header_image());
     /* Start header styles. */
     $style = '';
     /* Header image height. */
     $header_height = get_custom_header()->height;
     /* Header image width. */
     $header_width = get_custom_header()->width;
     /* When to show header image. */
     $min_width = absint(apply_filters('chuchadon_header_bg_show', 800));
     $background_arguments = esc_attr(apply_filters('chuchadon_header_bg_arguments', 'no-repeat'));
     if (!empty($header_image)) {
         $style .= "@media screen and (min-width: {$min_width}px) { body.custom-header-image .site-header { background: url({$header_image}) {$background_arguments}; -webkit-background-size: 50%; -moz-background-size: 50%; -o-background-size: 50%; background-size: 50%; } }";
     }
     /* Site title styles. */
     if (display_header_text()) {
         $style .= ".home-title a { color: #{$header_color} }";
     }
     if (!display_header_text()) {
         $style .= ".home-title, .home-description { clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden; }";
     }
     /* Echo styles if it's not empty. */
     if (!empty($style)) {
         echo "\n" . '<style type="text/css" id="custom-header-css">' . trim($style) . '</style>' . "\n";
     }
 }
    /**
     * Handles shortcode
     * @param $atts
     * @param null $content
     * @return string
     */
    public function handle($atts, $content = null)
    {
        extract(shortcode_atts($this->extractShortcodeAttributes($atts), $atts));
        $breadcrumbsHtml = '';
        if ($breadcrumbs == 'yes') {
            $breadcrumbsHtml = wp_nav_menu(array('container' => 'none', 'theme_location' => 'breadcrumbs', 'walker' => new ctBreadCrumbWalker(), 'echo' => false, 'items_wrap' => '%3$s'));
            $breadcrumbsHtml = $breadcrumbsHtml ? '<div class="breadcrumbs">

													            <div class="breadcrumbs-inner">
													                ' . $breadcrumbsHtml . '
													            </div>

													</div>' : '';
        }
        $id = $id ? ' id="' . $id . '"' : '';
        $html = $header ? '<header' . $id . ' style="background-image: url(' . get_header_image() . ')">



							                <h3 class="hdr1">' . $header . '</h3>



							</header>' : '';
        $html .= $breadcrumbsHtml;
        return $html;
    }
/**
 * Register a custom admin callback to display the custom header preview with the
 * same style as is shown on the front end.
 *
 */
function corporate_admin_style()
{
    $headimg = sprintf('.appearance_page_custom-header #headimg { background: url(%s) no-repeat; font-family: Droid Sans, arial, serif; min-height: %spx; text-shadow: #000 1px 1px; }', get_header_image(), HEADER_IMAGE_HEIGHT);
    $h1 = sprintf('#headimg h1, #headimg h1 a { color: #%s; font-size: 30px; font-weight: normal; line-height: 30px; margin: 40px 0 0 15px; text-decoration: none; }', esc_html(get_header_textcolor()));
    $desc = sprintf('#headimg #desc { color: #%s; font-size: 16px; line-height: 1; margin: 10px 0 0 30px; }', esc_html(get_header_textcolor()));
    printf('<style type="text/css">%1$s %2$s %3$s</style>', $headimg, $h1, $desc);
}
/**
 * Register a custom admin callback to display the custom header preview with the
 * same style as is shown on the front end.
 *
 */
function fabric_admin_style()
{
    $headimg = sprintf('.appearance_page_custom-header #headimg { background: url(%s) no-repeat; font-family: Georgia, Times, Times New Roman, serif; min-height: %spx; }', get_header_image(), HEADER_IMAGE_HEIGHT);
    $h1 = sprintf('#headimg h1, #headimg h1 a { color: #%s; font-family: Pacifico, arial, serif; font-size: 48px; font-weight: normal; line-height: 60px; margin: 10px 0 0; text-align: center; text-decoration: none; text-shadow: #fff 1px 1px; }', esc_html(get_header_textcolor()));
    $desc = sprintf('#headimg #desc { color: #%s; font-family: Georgia, Times, Times New Roman, serif; font-size: 14px; font-style: italic; text-align: center; text-shadow: #fff 1px 1px; }', esc_html(get_header_textcolor()));
    printf('<style type="text/css">%1$s %2$s %3$s</style>', $headimg, $h1, $desc);
}
    /**
     * Custom header image markup displayed on the Appearance > Header admin panel.
     *
     * @see ipt_kb_custom_header_setup().
     */
    function ipt_kb_admin_header_image()
    {
        ?>
	<div id="headimg">
		<?php 
        if (get_header_image()) {
            ?>
		<img src="<?php 
            header_image();
            ?>
" alt="">
		<?php 
        } else {
            ?>
		<h1 class="displaying-header-text"><a id="name" onclick="return false;" href="<?php 
            echo esc_url(home_url('/'));
            ?>
"><?php 
            bloginfo('name');
            ?>
</a></h1>
		<?php 
        }
        ?>
	</div>
<?php 
    }
 function mh_logo()
 {
     $header_img = get_header_image();
     $header_title = get_bloginfo('name');
     $header_desc = get_bloginfo('description');
     echo '<a href="' . esc_url(home_url('/')) . '" title="' . esc_attr($header_title) . '" rel="home">' . "\n";
     echo '<div class="logo-wrap" role="banner">' . "\n";
     if ($header_img) {
         echo '<img src="' . esc_url($header_img) . '" height="' . get_custom_header()->height . '" width="' . get_custom_header()->width . '" alt="' . esc_attr($header_title) . '" />' . "\n";
     }
     if (display_header_text()) {
         $header_img ? $logo_pos = 'logo-overlay' : ($logo_pos = 'logo-text');
         $text_color = get_header_textcolor();
         if ($text_color != get_theme_support('custom-header', 'default-text-color')) {
             echo '<style type="text/css" id="mh-header-css">';
             echo '.logo-name, .logo-desc { color: #' . esc_attr($text_color) . '; }';
             echo '.logo-name { border-bottom: 3px solid #' . esc_attr($text_color) . '; }';
             echo '</style>' . "\n";
         }
         echo '<div class="logo ' . $logo_pos . '">' . "\n";
         if ($header_title) {
             echo '<h1 class="logo-name">' . esc_attr($header_title) . '</h1>' . "\n";
         }
         if ($header_desc) {
             echo '<h2 class="logo-desc">' . esc_attr($header_desc) . '</h2>' . "\n";
         }
         echo '</div>' . "\n";
     }
     echo '</div>' . "\n";
     echo '</a>' . "\n";
 }
Example #19
0
 function warrior_enqueue_scripts()
 {
     global $pagenow;
     // Only load these scripts on frontend
     if (!is_admin() && $pagenow != 'wp-login.php') {
         // Load all Javascript files
         wp_enqueue_script('jquery');
         if (is_singular()) {
             wp_enqueue_script('comment-reply');
         }
         wp_enqueue_script('jquery-floating-placeholder', get_template_directory_uri() . '/js/jquery-floating-placeholder.min.js', '', null, true);
         wp_enqueue_script('justifiedGallery', get_template_directory_uri() . '/js/jquery.justifiedGallery.min.js', '', '3.5.1', true);
         wp_enqueue_script('backstretch', get_template_directory_uri() . '/js/jquery.backstretch.min.js', '', null, true);
         wp_enqueue_script('owlcarousel', get_template_directory_uri() . '/js/owl.carousel.min.js', '', '1.1', true);
         wp_enqueue_script('fitvids', get_template_directory_uri() . '/js/jquery.fitvids.js', '', '1.1', true);
         wp_enqueue_script('slicknav', get_template_directory_uri() . '/js/jquery.slicknav.min.js', '', '1.0.3', true);
         wp_enqueue_script('mobilemenu', get_template_directory_uri() . '/js/jquery.mobilemenu.js', '', '1.1', true);
         wp_enqueue_script('functions', get_template_directory_uri() . '/js/functions.js', '', null, true);
         // Localize script
         wp_localize_script('functions', '_warrior', array('bg_header' => esc_url(get_header_image())));
         // Load all CSS files
         wp_enqueue_style('reset', get_template_directory_uri() . '/css/reset.css', array(), false, 'all');
         wp_enqueue_style('justifiedGallery', get_template_directory_uri() . '/css/justifiedGallery.min.css', array(), false, 'all');
         wp_enqueue_style('linecons', get_template_directory_uri() . '/css/linecons.css', array(), false, 'all');
         wp_enqueue_style('zocial', get_template_directory_uri() . '/css/zocial.css', array(), false, 'all');
         wp_enqueue_style('owlcarousel', get_template_directory_uri() . '/css/owl.carousel.css', array(), false, 'all');
         wp_enqueue_style('slicknav', get_template_directory_uri() . '/css/slicknav.min.css', array(), false, 'all');
         wp_enqueue_style('style', get_template_directory_uri() . '/style.css', array(), false, 'all');
         wp_enqueue_style('responsive', get_template_directory_uri() . '/css/responsive.css', array(), false, 'all');
         // Load custom CSS file
         wp_enqueue_style('custom', get_template_directory_uri() . '/custom.css', array(), false, 'screen');
     }
 }
function cc_add_header_image()
{
    global $post;
    $header_image = get_header_image();
    $custom_header_image = get_custom_header();
    /*echo '<!-- debug: header_image ' . print_r( array('header_image' => $header_image, 'custom_header_image' => $custom_header_image ), true ). ' -->';*/
    if (!empty($header_image)) {
        ?>
	<div class="cc-header-image">	
		<a class="cc-header-image-link" href="<?php 
        echo esc_url(home_url('/'));
        ?>
" title="<?php 
        echo esc_attr(get_bloginfo('name', 'display'));
        ?>
" rel="home">
			<img src="<?php 
        echo $header_image;
        ?>
" width="<?php 
        echo $custom_header_image->width;
        ?>
" height="<?php 
        echo $custom_header_image->height;
        ?>
" alt="">
		</a>
	</div>	
	<?php 
    }
}
function WYBT_getThePageHeader()
{
    $title = get_bloginfo('nameget_bloginfo');
    $description = get_bloginfo('descriptionget_bloginfo');
    $backgroundImage = get_header_image();
    return apply_filters("VF_getThePageHeader", "", $title, $description, $backgroundImage);
}
Example #22
0
function header_bg_image_settings()
{
    $header_settings_array = array();
    if (get_theme_mod('display_header_img_as_header_bg') == '') {
        //if the box is not checked, display image to the left
        $header_settings_array["header_img_display"] = "block";
        $header_settings_array["header_img"] = esc_url(get_header_image());
        $header_settings_array["header_bg_img"] = "";
        $header_settings_array["text_align"] = "left";
        $header_settings_array["header_bg_size"] = "";
        $header_settings_array["header_bg_repeat"] = "";
        $header_settings_array["header_bg_position"] = "";
        return $header_settings_array;
    } else {
        $header_settings_array["header_img_display"] = "none";
        $header_settings_array["header_img"] = "";
        $header_settings_array["header_bg_img"] = esc_url(get_header_image());
        $header_settings_array["text_align"] = "center";
        $header_settings_array["header_bg_position"] = "center";
        switch (get_theme_mod('header_bg_img_style')) {
            case "repeat":
                $header_settings_array["header_bg_size"] = "contain";
                $header_settings_array["header_bg_repeat"] = "repeat";
                break;
            case "stretch":
                $header_settings_array["header_bg_size"] = "100%, 100%";
                $header_settings_array["header_bg_repeat"] = "no-repeat";
                break;
            default:
                $header_settings_array["header_bg_size"] = "auto, 100%";
                $header_settings_array["header_bg_repeat"] = "no-repeat";
        }
        return $header_settings_array;
    }
}
Example #23
0
/**
 * Extend the default WordPress body classes.
 *
 * Adds body classes to denote:
 * 1. Single or multiple authors.
 * 2. Presence of header image.
 * 3. Index views.
 * 4. Full-width content layout.
 * 5. Presence of footer widgets.
 * 6. Single views.
 * 7. Featured content layout.
 *
 * @param array $classes A list of existing body class values.
 *
 * @return array The filtered body class list.
 * @internal
 */
function _filter_theme_body_classes($classes)
{
    if (is_multi_author()) {
        $classes[] = 'group-blog';
    }
    if (get_header_image()) {
        $classes[] = 'header-image';
    } else {
        $classes[] = 'masthead-fixed';
    }
    if (is_archive() || is_search() || is_home()) {
        $classes[] = 'list-view';
    }
    if (function_exists('fw_ext_sidebars_get_current_position')) {
        $current_position = fw_ext_sidebars_get_current_position();
        if (in_array($current_position, array('full', 'left')) || empty($current_position) || is_page_template('page-templates/full-width.php') || is_page_template('page-templates/contributors.php') || is_attachment()) {
            $classes[] = 'full-width';
        }
    } else {
        $classes[] = 'full-width';
    }
    if (is_active_sidebar('sidebar-1')) {
        $classes[] = 'footer-widgets';
    }
    if (is_singular() && !is_front_page()) {
        $classes[] = 'singular';
    }
    if (is_front_page() && 'slider' == get_theme_mod('featured_content_layout')) {
        $classes[] = 'slider';
    } elseif (is_front_page()) {
        $classes[] = 'grid';
    }
    return $classes;
}
Example #24
0
 function training_wpo_woocommerce_breadcrumbs($array)
 {
     global $trainingconfig;
     $style = "";
     if (is_front_page()) {
         return;
     }
     $customize_image = get_header_image();
     if (isset($trainingconfig['breadcrumb']) && $trainingconfig['breadcrumb'] || is_single() || is_archive()) {
         if (isset($trainingconfig['background_breadcrumb']) && $trainingconfig['background_breadcrumb']) {
             if ($trainingconfig['background_breadcrumb'] == 'bg_image') {
                 $style = 'background-image: url(' . esc_url_raw($trainingconfig['image_breadcrumb']) . ');';
             } else {
                 if ($trainingconfig['background_breadcrumb'] == 'bg_color' && !empty($trainingconfig['bg_color'])) {
                     $style = 'background-color:' . esc_attr($trainingconfig['bg_color']);
                 } else {
                     $style = "background: url('" . get_template_directory_uri() . "/images/breadcrumb.jpg') no-repeat center center #f9f9f9";
                 }
             }
         } elseif (isset($customize_image) && !empty($customize_image)) {
             $style = "background: url('" . esc_url_raw($customize_image) . "') no-repeat center center #f9f9f9";
         } else {
             $style = "background: url('" . get_template_directory_uri() . "/images/breadcrumb.jpg') no-repeat center center #f9f9f9";
         }
     }
     return array('delimiter' => ' &#47; ', 'wrap_before' => '<section id="breadcrumb" class="wpo-breadcrumbs-inner breadcrumbs space-35" style="' . $style . '"><nav class="container" itemprop="breadcrumb">', 'wrap_after' => '</nav></section>', 'before' => '', 'after' => '', 'home' => _x('Home', 'breadcrumb', 'training'));
 }
Example #25
0
    function airballoon_display_custom_header()
    {
        // Get Theme Options from Database
        $options = get_option('zeenoble_options');
        // Don't display header image on template-frontpage.php
        if (is_page_template('template-frontpage.php')) {
            return;
        }
        // Don't display header image when "display frontpage template automatically on home page" option is activated
        if (is_front_page() and isset($options['themeZee_frontpage_activate']) and $options['themeZee_frontpage_activate'] == 'true') {
            return;
        }
        // Check if page is displayed and featured header image is used
        if (is_page() && has_post_thumbnail()) {
            ?>
			<div id="custom-header">
				<?php 
            the_post_thumbnail('frontpage_slider_image');
            ?>
			</div>
<?php 
            // Check if there is a custom header image
        } elseif (get_header_image()) {
            ?>
			<div id="custom-header">
				<img src="<?php 
            echo get_header_image();
            ?>
" />
			</div>
<?php 
        }
    }
function custom_intro()
{
    echo "<div class='intro'>";
    if (is_front_page()) {
        if (get_header_image()) {
            echo '<img class="header-image" src="' . esc_url(get_header_image()) . '" alt="' . get_bloginfo('description') . '" />';
        }
    } else {
        // get title
        $id = get_option('page_for_posts');
        if (is_day() || is_month() || is_year() || is_tag() || is_category() || is_singular('post') || is_home()) {
            $the_title = get_the_title($id);
        } else {
            $the_title = get_the_title();
        }
        if (is_home() || is_singular('post')) {
            if (has_post_thumbnail($id)) {
                echo get_the_post_thumbnail($id, 'full');
            } elseif (get_header_image()) {
                echo '<img class="header-image" src="' . esc_url(get_header_image()) . '" alt="' . $the_title . '" />';
            }
        } elseif (has_post_thumbnail() && is_singular('page')) {
            the_post_thumbnail();
        } elseif (get_header_image()) {
            echo '<img class="header-image" src="' . esc_url(get_header_image()) . '" alt="' . $the_title . '" />';
        }
    }
    echo "</div>";
}
Example #27
0
/**
 * Callback function for outputting the custom header CSS to `wp_head`.
 *
 * @since  1.0.0
 * @access public
 * @return void
 */
function magik_custom_header_wp_head()
{
    $header_image = get_header_image();
    $style = "body.custom-header #branding {  }";
    $style = sprintf('body.custom-header #branding { background: url(%1$s) center center no-repeat !important; text-indent: -9999px;background-size: %2$dpx %3$dpx !important; min-height: %3$dpx}', esc_url($header_image), absint(get_custom_header()->width / 2), absint(get_custom_header()->height / 2));
    echo "\n" . '<style type="text/css" id="custom-header-css">' . trim($style) . '</style>' . "\n";
}
Example #28
0
    function glades_display_custom_header()
    {
        // Don't display header image on template-magazine.php
        if (is_page_template('template-magazine.php')) {
            return;
        }
        // Check if page is displayed and featured header image is used
        if (is_page() && has_post_thumbnail()) {
            ?>
			<div id="custom-header-wrap">
				<div id="custom-header" class="featured-image-header">
					<?php 
            the_post_thumbnail('glades-header-image');
            ?>
				</div>
			</div>
<?php 
            // Check if there is a custom header image
        } elseif (get_header_image()) {
            ?>
			<div id="custom-header-wrap">
				<div id="custom-header">
					<img src="<?php 
            echo get_header_image();
            ?>
" />
				</div>
			</div>
<?php 
        }
    }
 function mh_newsdesk_lite_logo()
 {
     $header_img = get_header_image();
     $header_title = get_bloginfo('name');
     $header_desc = get_bloginfo('description');
     echo '<a href="' . esc_url(home_url('/')) . '" title="' . esc_attr($header_title) . '" rel="home">' . "\n";
     echo '<div class="logo-wrap" role="banner">' . "\n";
     if ($header_img) {
         echo '<img src="' . esc_url($header_img) . '" height="' . get_custom_header()->height . '" width="' . get_custom_header()->width . '" alt="' . esc_attr($header_title) . '" />' . "\n";
     }
     if (0 && display_header_text()) {
         $text_color = get_header_textcolor();
         if ($text_color != get_theme_support('custom-header', 'default-text-color')) {
             echo '<style type="text/css" id="mh-header-css">';
             echo '.logo-title, .logo-tagline { color: #' . esc_attr($text_color) . '; }';
             echo '</style>' . "\n";
         }
         echo '<div class="logo">' . "\n";
         if ($header_title) {
             echo '<h1 class="logo-title">' . esc_attr($header_title) . '</h1>' . "\n";
         }
         if ($header_desc) {
             echo '<h2 class="logo-tagline">' . esc_attr($header_desc) . '</h2>' . "\n";
         }
         echo '</div>' . "\n";
     }
     echo '</div>' . "\n";
     echo '</a>' . "\n";
 }
/**
 * Apply inline style to the Storefront header.
 * @uses  get_header_image()
 * @since  2.0.0
 */
function storefront_header_styles()
{
    $styles = apply_filters('storefront_header_styles', array('background-image' => 'url(' . esc_url(get_header_image()) . ')'));
    foreach ($styles as $style => $value) {
        echo $style . ': ' . $value . '; ';
    }
}