This file contains 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
<style type="text/css"> | |
.acf-map { | |
width: 100%; | |
height: 400px; | |
border: #ccc solid 1px; | |
margin: 20px 0; | |
} | |
/* fixes potential theme css conflict */ |
This file contains 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
/** | |
* ACF | |
* | |
* Save action hook to grab that email from member profile and update the user_email | |
*/ | |
function my_acf_save_post( $post_id ) { | |
// bail early if no ACF data | |
if( empty($_POST['acf']) ) { | |
return; | |
} |
This file contains 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
/** | |
* Excludes chosen project category from home | |
*/ | |
function excludeCat($query) { | |
if ( $query->is_home ) { | |
$query->set('cat', '-198'); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts', 'excludeCat'); |
This file contains 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 | |
$location = get_field('your_location'); | |
if( !empty($location) ): | |
?> | |
<?php $location = explode( "," , $location['address']); | |
echo $location[0].', '; //street number | |
echo $location[1].','.$location[2]; //city, state + zip | |
// print_r($location); |
This file contains 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 | |
$location = get_field('your_location'); | |
if( !empty($location) ): | |
?> | |
<?php echo $location['lat']; ?> | |
<?php echo $location['lng']; ?> | |
<?php endif; ?> |
This file contains 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 this to your theme functions.php | |
// new_rs_after_js_init_code action is available since v3.1.7. | |
function add_additional_rs_code() { | |
?> | |
// put JS code here | |
<!-- $('.rsGCaption').appendTo('.some-new-container') | |
--> | |
<?php | |
} |
This file contains 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
/** | |
* Create Mixins | |
*/ | |
@mixin font-light { | |
font-family: 'Open Sans', "Helvetica Neue", Arial, sans-serif; | |
font-weight: 300; | |
font-style: normal; | |
} |
This file contains 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
// Flexslider wordpress gallery | |
// The following should live in functions.php | |
add_filter( 'post_gallery', 'my_post_gallery', 10, 2 ); | |
function my_post_gallery( $output, $attr) { | |
global $post, $wp_locale; | |
static $instance = 0; | |
$instance++; |
This file contains 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="post <?php echo $i % 2 == 0 ? "even" : "odd" ?>"> |