Created
September 17, 2018 01:15
-
-
Save radarin/4243f182715714cf10fe70b3d492443e to your computer and use it in GitHub Desktop.
Shortcode im Theme verankern
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 | |
// Macht den Shortcode innerhalb des Theme ausfürbar, Inhalt | |
$content = apply_filters('the_content', get_the_content()); | |
$content = '[effekt type="zoom" duration="1"]' . $content . '[/effekt]'; | |
$content = do_shortcode($content); | |
echo $content; | |
// Macht den Shortcode innerhalb des Theme ausfürbar, Auszug | |
$excerpt = apply_filters('the_excerpt', get_the_excerpt()); | |
$excerpt = '[effekt type="zoom" duration="1"]' . $excerpt . '[/effekt]'; | |
$excerpt = do_shortcode($excerpt); | |
echo $excerpt; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment