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 | |
function delete_its_transients() { | |
global $post; | |
if( $post->post_type == 'cpt' ) { | |
delete_transient( 'transient_name' ); | |
} | |
} | |
add_action( 'save_post', 'delete_its_transients' ); |
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
[video src="http://www.video-url.com"][/video] |
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 | |
/* | |
Based on Ohad Raz - https://en.bainternet.info/custom-post-types-columns/ | |
Some info: | |
-- The classes read the meta field of the CPT ID and enable the sorting | |
-- It's possible remove other column | |
-- Support 4 type of object natively: Title, Thumbnail, Custom Taxonomy, Custom Field | |
-- Add a filter cpt_columns_text_{column_name_id} in Title type | |
-- prefix/suffix values are for all the objects except post_thumb |
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 | |
// get post ID | |
$pid = get_the_ID(); | |
// get our repeater | |
$repeater = get_post_meta( $pid, 'acf_repeater_slug', true ); | |
if ( !empty($repeater) ) { | |
for( $i = 0; $i < $repeater; $i++ ) { |
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 | |
// get taxonomy | |
$taxonomy = get_term_by( 'slug', get_query_var( 'taxonomy_name' ), 'my_custom_taxonomy' ); | |
$acf_field = get_option( 'my_custom_taxonomy_' . $taxonomy->term_id . '_acf_field_slug' ); |
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 | |
$acf_field_one = get_option( 'options_acf_field_one' ); | |
$acf_field_two = get_option( 'options_acf_field_two' ); |
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 | |
// get post ID | |
$pid = get_the_ID(); | |
$flex_rows = get_post_meta( $pid, 'acf_flex_content', true ); | |
if ( !empty($flex_rows) ) { | |
foreach( $flex_rows as $count => $row ) { |
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 | |
// get post ID | |
$pid = get_the_ID(); | |
// acf field | |
$acf_field = get_post_meta( $pid, 'acf_field_slug', true ); |
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 | |
// get post ID | |
$pid = get_the_ID(); | |
// get our repeater | |
$repeater = get_post_meta( $pid, 'acf_repeater_slug', true ); | |
if( !empty($repeater) ) { | |
for( $i = 0; $i < $repeater; $i++ ) { |
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
//================================= | |
// FORMSTONE - SELECTER | |
//================================= | |
.selecter { | |
display: block; | |
margin-right: 6px; | |
position: relative; | |
width: 100%; | |
float: left; |