Adding shortcodes in php script
-
Thanks for adding the way to deactivate the front-end and updating the Facebook share count.
I wrote a PhP function to add the counters in my genesis_entry_header but the shortcode is breaking everything.
add_action('genesis_entry_header', 'after_title_text', 12); function after_title_text() { if (is_single()) { echo '<div class="twitter-count"> [network='twitter']</div>'; } }If I change a letter it doesn’t break the PhP and just appears as text so I think the shortcode is activating but just somehow breaking everything else.
Thanks,
Michael
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Adding shortcodes in php script’ is closed to new replies.