Title: Using shortcode $post = null
Last modified: July 9, 2018

---

# Using shortcode $post = null

 *  Resolved [eligence](https://wordpress.org/support/users/eligence/)
 * (@eligence)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/using-shortcode-post-null/)
 * I am using the shortcode to generate social sharing links in a custom post loop
   and am dynamically passing in the urls (see my previous post support ticket [here](https://wordpress.org/support/topic/social-sharing-copy-link-not-working/)).
   This is throwing php notices every post as in super-socializer/inc/social_sharing.
   php `the_champ_prepare_sharing_html()` is declaring `$post` as global. In this
   use case `$post = null`. This can be fixed by adding
 *     ```
        if (NULL === $post) {
               $post = get_post($shareCountTransientId);
       } 
       ```
   
 * on line 14.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fusing-shortcode-post-null%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Heateor Support](https://wordpress.org/support/users/heateor/)
 * (@heateor)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/using-shortcode-post-null/#post-10478058)
 * Okay. We will take care of this in upcoming releases.
 *  Plugin Author [Heateor Support](https://wordpress.org/support/users/heateor/)
 * (@heateor)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/using-shortcode-post-null/#post-10589381)
 * Fixed in version 7.12. Update your plugin.

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

The topic ‘Using shortcode $post = null’ is closed to new replies.

 * ![](https://ps.w.org/super-socializer/assets/icon-128x128.png?rev=1866723)
 * [Social Share, Social Login and Social Comments Plugin - Super Socializer](https://wordpress.org/plugins/super-socializer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/super-socializer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/super-socializer/)
 * [Active Topics](https://wordpress.org/support/plugin/super-socializer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/super-socializer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/super-socializer/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Heateor Support](https://wordpress.org/support/users/heateor/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/using-shortcode-post-null/#post-10589381)
 * Status: resolved