Title: Adding shortcodes in php script
Last modified: August 30, 2016

---

# Adding shortcodes in php script

 *  Resolved [harvoolio](https://wordpress.org/support/users/harvoolio/)
 * (@harvoolio)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/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
 * [https://wordpress.org/plugins/accesspress-social-share/](https://wordpress.org/plugins/accesspress-social-share/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [harvoolio](https://wordpress.org/support/users/harvoolio/)
 * (@harvoolio)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/adding-shortcodes-in-php-script/#post-6496943)
 * I even tried using the script in my genesis_post_meta function that creates the
   categories with shortcode [post_categories] but to no avail. That script looks
   with the code looks like:
 *     ```
       // Customize the entry meta in the entry footer (requires HTML5 theme support)
       add_filter( 'genesis_post_meta', 'sp_post_meta_filter', 20 );
       function sp_post_meta_filter($post_meta) {
       	$post_meta = '[post_categories] [apss-count network='twitter']';
       	return $post_meta;
       }
       ```
   
 * Thanks.
 *  Plugin Author [Access Keys](https://wordpress.org/support/users/access-keys/)
 * (@access-keys)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/adding-shortcodes-in-php-script/#post-6496961)
 * Hello there,
 * Can you please send us your site link where you have implemented this so that
   we can debug it and can give some suggestions regarding this issue.
 * You can send us your site details to our support email [support@accesspressthemes.com](https://wordpress.org/support/topic/adding-shortcodes-in-php-script/support@accesspressthemes.com?output_format=md)
   in private as well.
 * Thanks
 *  Thread Starter [harvoolio](https://wordpress.org/support/users/harvoolio/)
 * (@harvoolio)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/adding-shortcodes-in-php-script/#post-6497075)
 * Will do. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding shortcodes in php script’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/accesspress-social-share_cbdfe8.svg)
 * [AccessPress Social Share](https://wordpress.org/plugins/accesspress-social-share/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/accesspress-social-share/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/accesspress-social-share/)
 * [Active Topics](https://wordpress.org/support/plugin/accesspress-social-share/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/accesspress-social-share/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/accesspress-social-share/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [harvoolio](https://wordpress.org/support/users/harvoolio/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/adding-shortcodes-in-php-script/#post-6497075)
 * Status: resolved