Exemplo n.º 1
0
function the_post_subtitle($post = false)
{
    if (!$post) {
        $post = get_the_ID();
    }
    if (has_post_subtitle($post)) {
        echo get_post_subtitle($post);
    }
}
Exemplo n.º 2
0
if ('kalender' === get_post_type(get_the_ID())) {
    ?>
        <h2 class="page-subtitle">
            <?php 
    echo strftime('%d. %B', strtotime(get_post_meta(get_the_ID(), 'start_date', true)));
    ?>
            <?php 
    echo date('H.i', strtotime(get_post_meta(get_the_ID(), 'start_date', true)));
    ?>
 -
            <?php 
    echo date('H.i', strtotime(get_post_meta(get_the_ID(), 'end_date', true)));
    ?>
        </h2>
        <?php 
} elseif (has_post_subtitle()) {
    ?>
        <h2 class="page-subtitle"><?php 
    the_post_subtitle();
    ?>
</h2>
        
        <?php 
}
?>
    </header>
    <?php 
the_content();
?>
</article>
</section>