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 rrwd_has_post_youtube( $post_id ) { | |
if ( !function_exists( 'get_field') ) | |
return; | |
if ( get_field( 'acf_youtube', $post_id ) ) { | |
echo '<iframe class="frame-youtube" src="http://www.youtube.com/embed/'. get_field( 'acf_youtube') . '?feature=oembed" name="youtube" frameborder="0" allowfullscreen></iframe>' . "\n"; |
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 | |
$meta_value = get_post_meta( get_the_ID() , 'acf_date', true ); | |
$date = date_i18n( 'd M Y' , strtotime( $meta_value ) ); | |
?> |
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 gameaccess_acf_date( $id, $field ) { | |
$meta_value = get_post_meta( $id , $field, true ); | |
echo date_i18n( 'F d, Y' , strtotime( $meta_value ) ); | |
} | |
?> |
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 | |
/** | |
* Template Name: English page | |
* Adds lang=en to the entry-content div only | |
* | |
* @package Genesis\Templates | |
* @author Rian Rietveld | |
* @license GPL-2.0+ | |
*/ |
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 | |
// set custom post type templates in post meta | |
add_action('publish_name_cpt', 'prefix_add_template', 10, 2 ); | |
function prefix_add_template( $post_id, $post ) { | |
if ( $post_id == 1234 ) { | |
add_post_meta( $post_id, '_wp_page_template', 'your-template.php', 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 | |
add_action( 'admin_bar_menu', 'prefix_remove_stuf_admin_bar', 999 ); | |
function prefix_remove_stuf_admin_bar( $wp_admin_bar ) { | |
$wp_admin_bar->remove_node( 'wp-logo' ); | |
$wp_admin_bar->remove_node( 'comments' ); | |
$wp_admin_bar->remove_node( 'wpseo-menu' ); | |
if ( !current_user_can( 'edit_others_pages' ) ) { |
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Add Accessibility support | |
add_theme_support( 'genesis-accessibility', array( 'headings', 'drop-down-menu', 'search-form', 'skip-links', 'rems' ) ); |