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
/** | |
* 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
// 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
<?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
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 | |
/* | |
* 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
<section id="product-search" class="products-search products content-block entry"> | |
<?php if ( get_sub_field('ssm_headline') ) { ?> | |
<header class="content-block-header"> | |
<?php if ( get_sub_field('ssm_intro_copy') ) { ?> | |
<div class="intro"> |
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 | |
/** | |
* Load default choices from options page into content blocks | |
*/ | |
function acf_load_style_default_choices( $field ) { | |
// reset choices | |
$field['choices'] = 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
/* | |
* Returns the first instance of a given layout option | |
* @param - $id - the id of the post you are trying to target: '' by default | |
* @param - $fc_field - the name of the ACF flexible field: 'content_blocks' as the default | |
* @param - $fc_layout - the name of the flexible content layout: 'visual_editor' as the default | |
* @return - mixed | |
* @todo - test different types of returned content. at the moment, I am only using this for returning a string | |
*/ | |
function get_first_instance_of_content_block( $id = '', $fc_field = 'content_blocks', $fc_layout = 'visual_editor' ) { | |
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
<script> | |
gform.addFilter( 'gform_datepicker_options_pre_init', function( optionsObj, formId, fieldId ) { | |
if ( formId == 2 && fieldId == 5 ) { | |
optionsObj.dateFormat = 'mm-dd-yy'; | |
} | |
return optionsObj; | |
}); | |
</script> |