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> | |
.copyright a, .copyright{ | |
color:#B0B0B0; | |
font-size:12px; | |
} | |
.copyright a:hover{ | |
color:white; | |
} | |
</style> | |
<p class="copyright">Website designed by <strong><a class="copyright" href="https://.thecreativetinker.com" target="_blank">The Creative Tinker</a></strong> | Copyright © 2020</p> |
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 | |
//Add dynamic class to posts | |
//dynamic_classes_oxygen_repeater.php | |
//Add this into a codeblock | |
<style type="text/css"> | |
.post-<?php the_ID() ?> #DIV_ID_HERE{ | |
background-color:<?php the_field('ACF_FIELD_HERE'); ?>; | |
} |
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
function tct_set_new_date() { | |
$posts = get_posts( array('post_type' => 'session', 'posts_per_page' => - 1) ); | |
$current_date = date( "Y-m-d h:i" ); | |
foreach($posts as $post) { | |
$old_date = get_field( 'date', $post->ID ); | |
if($old_date < $current_date) { | |
$new_date = date( 'Y-m-d h:i', strtotime( '+1 week', strtotime( $old_date ) ) ); | |
update_field( 'date', $new_date, $post->ID ); |
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
/** | |
* Display a custom taxonomy dropdown in admin | |
* @author Mike Hemberger | |
* @link http://thestizmedia.com/custom-post-type-filter-admin-custom-taxonomy/ | |
*/ | |
add_action('restrict_manage_posts', 'tsm_filter_post_type_by_taxonomy'); | |
function tsm_filter_post_type_by_taxonomy() { | |
global $typenow; | |
$post_type = 'team'; // change to your post type | |
$taxonomy = 'group'; // change to your taxonomy |
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
.wp-grid-builder .wpgb-sidebar { | |
position: sticky; | |
flex-basis: 50%; | |
height: 100vh; | |
top: 0; | |
} | |
.wp-grid-builder .wpgb-main { | |
overflow: hidden; | |
padding: 3em 4em; | |
} |
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 | |
$link = get_field('gmb_url'); | |
if( $link ): ?> | |
<iframe src="<?php echo esc_url( $link ); ?>" width="1200" height="900" frameborder="0" style="border:0;" allowfullscreen=""></iframe> | |
<?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
function check_query_field( $cpt_name, $acf_field ){ //Put CPT as function name | |
//WP_Query arguments | |
$args = array( | |
'post_type' => array( $cpt_name ),//CPT NAME Here | |
'meta_query' => array( | |
array( | |
'key' => $acf_field, //ACF FIELD NAME HERE | |
'value' => get_the_ID(), | |
'compare' => 'LIKE', |
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
//Set the repeater to 100% width | |
// Set display:block | |
// Add the below to custom css in repeater | |
-webkit-column-count: 4; | |
-moz-column-count: 4; | |
column-count: 4; | |
// Set Div inside repeater to display:block | |
//Add the below to the custom css |
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
// remove update notice for forked plugins | |
function remove_update_notifications($value) { | |
if ( isset( $value ) && is_object( $value ) ) { | |
unset( $value->response[ plugin_basename(__FILE__) ] ); | |
} | |
return $value; | |
} | |
add_filter( 'site_transient_update_plugins', 'remove_update_notifications' ); |
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
/*Image Overlay on Hover*/ | |
.image-overlay{ | |
position: relative; | |
cursor: pointer; | |
} | |
.text-colour a{ | |
color:black; | |
} | |
.image-overlay:after { | |
content: ""; |
OlderNewer