This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div { | |
position:relative; /* Position must be relative to absolutely position :after */ | |
background:#333; /* Background color to show effect */ | |
} | |
div:after{ | |
content:''; /* Required to display content */ | |
position: absolute; /* Sets the position absolute to the top div */ | |
top: 0; | |
left: 50%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hides The Admin Bar On The Front End | |
add_filter('show_admin_bar', '__return_false'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ## Float Clearing | |
--------------------------------------------- */ | |
%clearfix { | |
&:before { | |
content: " "; | |
display: table; | |
} | |
&:after { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( is_page_template( 'about.php' ) ) { | |
// Returns true when 'about.php' is being used. | |
add_action('genesis_after_header', 'genesis_do_subnav'); | |
} else { | |
// Returns false when 'about.php' is not being used. | |
remove_action('genesis_after_header', 'genesis_do_subnav'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//**** Functions used on this page **// | |
// Show portfolio image on single portfolio page | |
function bw_show_featured_image() { | |
echo '<div class="project-image">'; | |
$image_args = array( | |
'size' => 'large', | |
'attr' => array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.above-post-hero { | |
max-width:100%; | |
height:400px; | |
background-size:cover; | |
background-position:50% 50%; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add hero image above post/page content | |
// Create new image size for our hero image | |
add_image_size( 'hero-image', 1400, 400, TRUE ); // creates a hero image size | |
// Hook after header area | |
add_action( 'genesis_after_header', 'bw_hero_image' ); | |
function bw_hero_image() { | |
// If it is a page and has a featured thumbnail, but is not the front page do the following... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sticky top bar that hides on scroll down, reveals on scroll up | |
// Benweiser.com | |
function bw_sticky_bar() { | |
wp_enqueue_script( | |
'bw-sticky-bar', | |
get_stylesheet_directory_uri() . '/js/stickybar.js', | |
array( 'jquery' ) | |
); | |
} |
OlderNewer