Title: Manually Placing In Theme Causing Error
Last modified: August 20, 2016

---

# Manually Placing In Theme Causing Error

 *  [degmsb](https://wordpress.org/support/users/degmsb/)
 * (@degmsb)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/manually-placing-in-theme-causing-error/)
 * When I use the code in the FAQ’s and place in my header section.
 *     ```
       <?php echo really_simple_share_publish(get_bloginfo('url'), get_bloginfo('name'));?>
       ```
   
 * I get this error when wp debug is turned on.
 * `Notice: Trying to get property of non-object in /home3/ans/public_html/wp-includes/
   post-template.php on line 29`
 * Any idea how to resolve this issue?
 * [http://wordpress.org/extend/plugins/really-simple-facebook-twitter-share-buttons/](http://wordpress.org/extend/plugins/really-simple-facebook-twitter-share-buttons/)

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

 *  [whiletrue](https://wordpress.org/support/users/whiletrue/)
 * (@whiletrue)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/manually-placing-in-theme-causing-error/#post-3480471)
 * Hi degmsb,
    the issue should disappear upgrading to the 2.9.1 plugin release,
   out today.
 *  Thread Starter [degmsb](https://wordpress.org/support/users/degmsb/)
 * (@degmsb)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/manually-placing-in-theme-causing-error/#post-3480472)
 * Hi thank you for the update. I am still seeing the issue on my site with the 
   2.91, but it is not happening on all pages. If I don’t use the manual code in
   my theme I get no notices. But when I add the manual code, I get it on the my
   custom page for a taxonomy. I have two loops on the page, and when the first 
   loop is returning no result, I am noticing the error. However if the first loop
   returns results I get no issues.
 * Any ideas?
 * Thank you.
 *  Thread Starter [degmsb](https://wordpress.org/support/users/degmsb/)
 * (@degmsb)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/manually-placing-in-theme-causing-error/#post-3480480)
 * Any update on this? Here is some behavior I have noticed:
 * Except for one custom taxonomy page, the plugin is working on all of my site 
   with no notices. But on that one page I get this notice and the facbook button
   does not show.
 * Notice: Trying to get property of non-object in /home3/fefer/public_html/wp-includes/
   post-template.php on line 29
 * I have reviewed line 29 and here is what I think is happening.
 * My taxonomy page has two main custom queries built into it and two wordpress 
   loops. These queries modify the main wordpress query for the page.
 * It seems if the first query does not return results then it causes the error 
   above if the plugin is active.
 * However, if the first query returns results then there is no error and the plugin
   works fine even if the second query returns results.
 * And if the plugin is not active I get no error whether the first query returns
   results or not.
 * I also tried turning off the facebook setting in the admin of the plugin. But
   the notice still happens.
 * Any help you can provide is much appreciated! Thank you!
 *  Thread Starter [degmsb](https://wordpress.org/support/users/degmsb/)
 * (@degmsb)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/manually-placing-in-theme-causing-error/#post-3480481)
 * Here is an update, I think I have narrowed down why the error happens. Basically
   if there are no posts set to published the error happens. But when you add just
   1 published post the error does not happen and everything works fine. This is
   an issue for me because my custom taxonomy page publishes draft posts and published
   posts. So if a particular geography only has a draft and not a published post,
   I get an error.
 * Can you fix this in the plugin?
 * Thank you!

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

The topic ‘Manually Placing In Theme Causing Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/really-simple-facebook-twitter-share-
   buttons_96bbf2.svg)
 * [Really Simple Share](https://wordpress.org/plugins/really-simple-facebook-twitter-share-buttons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/really-simple-facebook-twitter-share-buttons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/really-simple-facebook-twitter-share-buttons/)
 * [Active Topics](https://wordpress.org/support/plugin/really-simple-facebook-twitter-share-buttons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/really-simple-facebook-twitter-share-buttons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/really-simple-facebook-twitter-share-buttons/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [degmsb](https://wordpress.org/support/users/degmsb/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/manually-placing-in-theme-causing-error/#post-3480481)
 * Status: not resolved