Example #1
0
                echo esc_url(home_url('/'));
                ?>
" rel="home"><?php 
                bloginfo('name');
                ?>
</a></p>
							<?php 
            }
        }
        if (!aaron_get_meta('aaron_hide_action_meta')) {
            aaron_action();
        }
        if (!aaron_get_meta('aaron_hide_highlights_meta')) {
            aaron_highlights();
        }
        if (!aaron_get_meta('aaron_hide_tagline')) {
            if (display_header_text() && get_bloginfo('description') != '') {
                ?>
							<div class="site-description"><?php 
                bloginfo('description');
                ?>
</div>
						<?php 
            }
        }
    } else {
        //If it's not a post or paged combined with a header, show the site title in a h1, without a link.
        if (display_header_text()) {
            // $logo_path = get_bloginfo('stylesheet_directory') . '/library/images/TAASC_logo_white_undertones.png';
            // echo '<a href="' . esc_url( home_url( '/' ) ) . '" rel="home"><img href="' . $logo_path . '" id="taasc_logo"></img></a>';
            //echo '<h1 class="site-title">' . get_bloginfo( 'name' ) . '</h1>';
Example #2
0
function aaron_featured_image_header_css()
{
    /*Are we displaying the featured image or the regular background? */
    if (is_home()) {
        $postid = get_option('page_for_posts');
    } else {
        $postid = get_the_ID();
    }
    $featured_header = wp_get_attachment_image_src(get_post_thumbnail_id($postid), 'aaron-featured-image-header');
    // Single view
    if (is_singular() && aaron_get_meta('aaron_show_header') && aaron_get_meta('aaron_featured_image_header') && $featured_header) {
        ?>
		.site-header {
		background: <?php 
        echo esc_attr(get_theme_mod('aaron_header_bgcolor', '#4777a6'));
        ?>
 url(<?php 
        echo $featured_header[0];
        ?>
) <?php 
        echo esc_attr(get_theme_mod('aaron_header_bgrepeat', 'no-repeat'));
        ?>
 <?php 
        echo esc_attr(get_theme_mod('aaron_header_bgpos', 'center center'));
        ?>
;
		background-size: <?php 
        echo esc_attr(get_theme_mod('aaron_header_bgsize', 'cover'));
        ?>
;
		}
	<?php 
        // Posts page ( blog listing )
    } elseif (is_home() && aaron_get_meta('aaron_show_header') && aaron_get_meta('aaron_featured_image_header') && !is_front_page() && $featured_header) {
        ?>
		.site-header {
		background: <?php 
        echo esc_attr(get_theme_mod('aaron_header_bgcolor', '#4777a6'));
        ?>
 url(<?php 
        echo $featured_header[0];
        ?>
) <?php 
        echo esc_attr(get_theme_mod('aaron_header_bgrepeat', 'no-repeat'));
        ?>
 <?php 
        echo esc_attr(get_theme_mod('aaron_header_bgpos', 'center center'));
        ?>
;
		background-size: <?php 
        echo esc_attr(get_theme_mod('aaron_header_bgsize', 'cover'));
        ?>
;
		}
	<?php 
        //Front page, or if no featured image is chosen:
    } else {
        $header_image = get_header_image();
        if (!empty($header_image)) {
            ?>
			.site-header {
			background: <?php 
            echo esc_attr(get_theme_mod('aaron_header_bgcolor', '#4777a6'));
            ?>
 url(<?php 
            header_image();
            ?>
) <?php 
            echo esc_attr(get_theme_mod('aaron_header_bgrepeat', 'no-repeat'));
            ?>
 <?php 
            echo esc_attr(get_theme_mod('aaron_header_bgpos', 'center center'));
            ?>
;
			background-size: <?php 
            echo esc_attr(get_theme_mod('aaron_header_bgsize', 'cover'));
            ?>
;
			}

		<?php 
            /* No header image has been chosen, check for background color: */
        } else {
            echo '.site-header { background:' . esc_attr(get_theme_mod('aaron_header_bgcolor', '#4777a6')) . ';}';
        }
    }
}
Example #3
0
>
	<header class="entry-header">
		<?php 
if (!aaron_get_meta('aaron_replace_title')) {
    the_title('<h1 class="entry-title">', '</h1>');
}
?>
		<div class="entry-meta">
			<?php 
aaron_posted_on();
?>
		</div><!-- .entry-meta -->
	</header><!-- .entry-header -->

	<div class="entry-content">
		<?php 
if (!aaron_get_meta('aaron_show_header') || !aaron_get_meta('aaron_featured_image_header')) {
    if (has_post_thumbnail()) {
        the_post_thumbnail();
    }
}
the_content();
wp_link_pages(array('before' => '<div class="page-links">' . esc_html__('Pages:', 'aaron'), 'after' => '</div>'));
?>
		
	</div><!-- .entry-content -->
	<?php 
aaron_entry_footer();
?>
</article><!-- #post-## -->
Example #4
0
function aaron_meta_form($post)
{
    wp_nonce_field('_header_settings_nonce', 'aaaron_meta_nonce');
    ?>
	<p>
		<input type="checkbox" name="aaron_show_header" id="aaron_show_header" value="show-header" <?php 
    echo aaron_get_meta('aaron_show_header') === 'show-header' ? 'checked' : '';
    ?>
>
		<label for="aaron_show_header"><?php 
    esc_html_e('Show the header.', 'aaron');
    ?>
</label>
	</p>
	<p>
		<input type="checkbox" name="aaron_featured_image_header" id="aaron_featured_image_header" value="featured-image-header" <?php 
    echo aaron_get_meta('aaron_featured_image_header') === 'featured-image-header' ? 'checked' : '';
    ?>
>
		<label for="aaron_featured_image_header"><?php 
    esc_html_e('Use the featured image as header image. This requires the header to be active, and a featured image to be set. The image will inherit the background position from the default header.', 'aaron');
    ?>
</label>	
	</p>
	<p>
		<input type="checkbox" name="aaron_hide_action_meta" id="aaron_hide_action_meta" value="hide_action" <?php 
    echo aaron_get_meta('aaron_hide_action_meta') === 'hide_action' ? 'checked' : '';
    ?>
>
		<label for="aaron_hide_action_meta"><?php 
    esc_html_e('Hide the Call to Action button.', 'aaron');
    ?>
</label>	
	</p>
	<p>
		<input type="checkbox" name="aaron_hide_highlights_meta" id="aaron_hide_highlights_meta" value="hide_highlights" <?php 
    echo aaron_get_meta('aaron_hide_highlights_meta') === 'hide_highlights' ? 'checked' : '';
    ?>
>
		<label for="aaron_hide_highlights_meta"><?php 
    esc_html_e('Hide the Highlights.', 'aaron');
    ?>
</label>	
	</p>
	<p>
		<input type="checkbox" name="aaron_hide_tagline" id="aaron_hide_tagline" value="hide_tagline" <?php 
    echo aaron_get_meta('aaron_hide_tagline') === 'hide_tagline' ? 'checked' : '';
    ?>
>
		<label for="aaron_hide_tagline"><?php 
    esc_html_e('Hide the site Tag line (Description).', 'aaron');
    ?>
</label>	
	</p>
	<p>
		<input type="checkbox" name="aaron_replace_title" id="aaron_replace_title" value="replace_title" <?php 
    echo aaron_get_meta('aaron_replace_title') === 'replace_title' ? 'checked' : '';
    ?>
>
		<label for="aaron_replace_title"><?php 
    esc_html_e('Replace the site title in the header with your post or page title.', 'aaron');
    ?>
</label>	
	</p>
	<?php 
}
Example #5
0
function aaron_customize_css()
{
    echo '<style type="text/css">';
    if (is_admin_bar_showing()) {
        ?>
	 	.main-navigation{top:32px;}

	 	@media screen and ( max-width: 782px ) {
			.main-navigation{top:46px;}
		}

		@media screen and ( max-width: 600px ) {
			.main-navigation{top:0px;}
		}

	<?php 
    }
    echo ".site-title,\n\t\t.site-title a {\n\t\t  \tcolor:#" . get_header_textcolor() . ";\n\t\t  }\n";
    //If the site title text color is black, turn off the text shadow, or the text will be too blurry.
    if (get_header_textcolor() == '000000') {
        echo ".site-title, .site.title a{text-shadow:none;} \n";
    }
    //Call to Action text color
    if (get_theme_mod('aaron_action_color') != ' ') {
        echo "#action, #action a { color:" . esc_attr(get_theme_mod('aaron_action_color', '#ffffff')) . "; }\n";
    }
    //If the Call to action text color is black, turn off the text shadow, or the text will be too blurry.
    if (get_theme_mod('aaron_action_color') == '#000000') {
        echo "#action, #action a{text-shadow:none;} \n";
    }
    //Call to Action background color
    if (get_theme_mod('aaron_action_bgcolor') != '') {
        echo "#action, #action a { background:#" . esc_attr(get_theme_mod('aaron_action_bgcolor', 'none')) . "; }\n";
    }
    //Change UPPERCASE to Capitalized Text Instead
    if (get_theme_mod('aaron_caps')) {
        echo '.main-navigation,
			.widget-title,
			.widgettitle,
			.entry-title,
			.entry-title a,
			.site-title,
			.site-title a,
			.site-info,
			.site-description,
			.page-links,
			.page-title,
			.comments-title,
			.comment-reply-title,
			.featured-headline,
			.testimonial-entry-title,
			.featured-post h2 { text-transform:capitalize; }\\n';
    }
    //Font setting:
    echo ".featured-post h2,\n\t\t\t.featured-headline,\n\t\t\t.comments-title,\n\t\t\t.comment-reply-title,\n\t\t\t.testimonial-entry-title,\n\t\t\t.jetpack-testimonial .entry-title,\n\t\t\t.page-title,\n\t\t\t.entry-title, \n\t\t\t.entry-title a,\n\t\t\t.main-navigation,\n\t\t\t.widget-title,\n\t\t\t.widgettitle,\n\t\t\t.page-links,\n\t\t\t.site-info,\n\t\t\t.site-description,\n\t\t\t.site-title,\n\t\t\t.site-title a {\n\t\t\t\tfont-family: '" . esc_attr(get_theme_mod('aaron_font', 'Montserrat')) . "', sans-serif;\t\n\t\t\t}\n";
    // If avatars are enabled, alter the css:
    if (get_option('show_avatars')) {
        echo ".comment-metadata{\n\t\t\tmargin-left:70px;\n\t\t\tdisplay:block;\n\t\t\tmargin-top:-25px;\n\t\t}\n";
    }
    //Show the search on all screen sizes.
    if (get_theme_mod('aaron_show_search') != '') {
        ?>
		@media screen and (max-width: 800px) {	
			.topsearch { display:initial; } 
		}
	<?php 
    }
    //prints CSS for the featured image header meta box option. See custom-header.php.
    aaron_featured_image_header_css();
    // No tagline or call to action is visible, lets add some padding inside the header
    if (is_singular() && aaron_get_meta('aaron_show_header') && aaron_get_meta('aaron_hide_tagline') && aaron_get_meta('aaron_hide_action_meta') || is_singular() && aaron_get_meta('aaron_show_header') && bloginfo('description') == '' && aaron_get_meta('aaron_hide_action_meta') || is_home() && aaron_get_meta('aaron_show_header') && aaron_get_meta('aaron_hide_tagline') && aaron_get_meta('aaron_hide_action_meta') && !is_front_page() || is_home() && aaron_get_meta('aaron_show_header') && bloginfo('description') == '' && aaron_get_meta('aaron_hide_action_meta') && !is_front_page()) {
        echo ".site-branding{ padding-bottom: 45px; }\n";
    }
    // When combining a post or page with a header, reduce the space between the header and the content.
    if (is_singular() && aaron_get_meta('aaron_show_header')) {
        echo ".page .site-content,\n\n\t\t\t.single .site-content{margin-top:45px;}\n";
    }
}