add_shortcode not working …
-
In my twentyseventeen-child I have functions.php. This contains:
<?php function shortcode_hdid() { return 'Hello world'; } function add_ggc_shortcodes() { add_shortcode('hdid','shortcode_hdid'); } add_action('init', 'add_ggc_shortcodes', 99); ?>
… and in a page I insert [hdid] but Hello world does not appear when viewing the page.
This is driving me mad and any help would be most appreciated.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘add_shortcode not working …’ is closed to new replies.