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 | |
/* | |
* How do I append a class "row" to the class "site-header" as opposed to recreating "site-header" like I am here? | |
* | |
*/ | |
add_filter( 'genesis_attr_site-header', 'ssm_site_header' ); | |
/* | |
* Add the appropriate foundation class to site-header | |
* |
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
function remove_acf_menu() | |
{ | |
// provide a list of usernames who can edit custom field definitions here | |
$admins = array( | |
'admin', | |
'jrstaatsiii' | |
); | |
// get the current user |
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 if ( get_field('ssm_featured_course', 'options') ) { ?> | |
<?php $post_object = get_field('ssm_featured_course', 'options'); ?> | |
<?php $post = $post_object; ?> | |
<?php setup_postdata( $post ); ?> | |
<div id="featured-course"> | |
<div class="wrap"> |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/** | |
* Use an img tag for the logo | |
* @param $title | |
* @param $inside | |
* @param $wrap | |
* | |
* @return string | |
*/ | |
function ssm_modify_site_title_html( $title, $inside, $wrap ) { |
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 class="event-wrap"> | |
<div class="upcoming-events"> | |
<h3>Upcoming Events</h3> | |
<ul class="events"> | |
<?php | |
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
jQuery(document).ready(function($){ // so as to wait for any CSS-effecting assets to download | |
setTimeout(function() { // prepare the timeout | |
if(location.hash){ // is there a location hash? | |
if($(location.hash)){ // is there an element with an id that matches the location hash? | |
// determine the x location of the element we want to be in the viewport | |
var targetTop = $('#content').offset().top; |
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
do_action( 'woothemes_testimonials', array( | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'testimonial-category', | |
'field' => 'id', | |
'terms' => array( $testimonial_id ) | |
) | |
), | |
'limit' => 1, |
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
/** these are additions or replacements to the existing elements **/ | |
div.page {overflow:hidden;} /** base.css line 35 **/ | |
/** can we make the overall width match our site? 960px. It seems to hold up when I test in the browser **/ | |
/** update the #title-area width to 186px **/ | |
#title-area {width: 186px;} /** client.css line 13 **/ | |
/** update the background color to #f1f2f2 **/ | |
div.page_wrapper {background-color: #f1f2f2;} /** base.css line 56 **/ |
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_filter('body_class','add_category_to_single'); | |
function add_category_to_single($classes, $class) { | |
if (is_single() ) { | |
global $post; | |
foreach((get_the_category($post->ID)) as $category) { | |
// add category slug to the $classes array | |
$classes[] = $category->category_nicename; | |
} | |
} | |
// return the $classes array |