Last active
July 28, 2023 14:19
-
-
Save nextab/ff012bf15a2054414033b9fc5cb1e93e to your computer and use it in GitHub Desktop.
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
| function test($atts, $content = null) { | |
| $a = shortcode_atts([ | |
| 'class' => '' | |
| ], $atts); | |
| $return_string = ''; | |
| $my_field = get_field('my_field'); | |
| $my_class = get_field('my_class'); | |
| $return_string .= '<div class="test ' . $a["class"] . '"><h4 class="my_headline">' . $my_field . '</h4> | |
| <ul class="my-list"><li class="' . $my_class . '">Hier steht irgendwas</li></ul></div>'; | |
| return $return_string; | |
| } | |
| add_shortcode('test', 'test'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment