-
-
Save anonymous/4c201cf9ea2cd96da3c4c4e2de067df4 to your computer and use it in GitHub Desktop.
Test
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_shortcode( 'post_updated_date', 'rv_set_last_updated_date' ); | |
function rv_set_last_updated_date( $atts ) { | |
$my_post_meta = get_post_meta($post->ID, 'Update', true); | |
if ( genesis_get_custom_field('Update') ) { | |
if ( genesis_get_custom_field('Update') == '1' ){ | |
$last_updated .= 'Aktualisiert am ' . the_modified_date('j. F Y','','',false); | |
return $last_updated; | |
} else { | |
$last_updated .= 'Aktualisiert am '. genesis_get_custom_field('Update'); | |
return $last_updated; | |
} | |
} else{ | |
$published_on = get_the_time('j. F Y',false); | |
return $published_on; | |
} | |
} | |
//* Do those shortcodes when the post has been updated | |
add_filter( 'genesis_post_info', 'rv_post_info_filter' ); | |
function rv_post_info_filter( $post_info ) { | |
$post_info = '[post_updated_date] von [post_author_posts_link] [post_comments before=""]'; | |
return $post_info; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment