Title: the_content EMPTY
Last modified: November 14, 2016

---

# the_content EMPTY

 *  Resolved [ziomik](https://wordpress.org/support/users/ziomik/)
 * (@ziomik)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/the_content-empty/)
 * This plugin, once installed, returns an empty string when calls a filter hook
   named “the_content”.
    This is not good and has brought problems with other plugins.
   I had to disable it even if I really like.

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

 *  Thread Starter [ziomik](https://wordpress.org/support/users/ziomik/)
 * (@ziomik)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/the_content-empty/#post-8435723)
 * The code will strip the content if the get_the_author_meta(‘bitcoin’) does not
   exist
 * **ORIGINAL:**
 *     ```
       /* Add BitMate Donation Box After Posts */
       add_filter( 'the_content', 'bm_author_donation_box' );
   
       function bm_author_donation_box($content) {
   
       $display_options = get_option( 'bitmate_author_donations_display_options' );
   
       if( isset( $display_options['display_bm_post_box'] ) && $display_options[ 'display_bm_post_box' ] && !is_page() ) { 
   
       $bm_site_name = get_bloginfo( 'name' );
       $bm_author_name = get_the_author_meta( 'display_name' );
       $bm_post_url = get_permalink();
       $bm_author_bitcoin = get_the_author_meta( 'bitcoin' );
       $bm_author_donate_url = 'bitcoin:'. $bm_author_bitcoin.'?label=Donation-from%3A'. urlencode($bm_post_url) .'&message=Donation-from%3A'. urlencode($bm_post_url) .'';
   
       if( isset( $display_options['display_bm_author_credit'] ) && $display_options[ 'display_bm_author_credit' ] ) {
       $bm_author_credit = '<br/><small class="bitmate-author-credit"><a href="http://bitmate.net/author-donations/" rel="nofollow" class="bitmate-author-credit">Powered by BitMate Author Donations</a></small>';
       } else {
       $bm_author_credit = '';
       }
   
       $bm_donation_box='
       <div class="bitmate-author-donation">
       <div class="bitmate-author-scan">
       <a href="'.$bm_author_donate_url.'" title="Scan to Donate Bitcoin to '.$bm_author_name.'"><img src="http://chart.googleapis.com/chart?chs=150x150&cht=qr&chld=H|0&chl='.$bm_author_donate_url.'" alt="Scan to Donate Bitcoin" /></a>
       </div>
       <div class="bitmate-author-description">
       <strong>Ti piace?</strong> Donata Bitcoin a <a href="'. get_author_posts_url( get_the_author_meta( 'ID' ) ) .'" title="'. $bm_author_name .'" rel="author">'. $bm_author_name .'</a> :
       <br/>
       <a href="'.$bm_author_donate_url.'" title="Donate Bitcoin to '. $bm_author_name .'"><img src="'.plugins_url( 'images/bitcoin.png' , __FILE__ ).'" alt="Bitcoin" /> <strong>'. $bm_author_bitcoin .'</strong></a></a>
       <br/>
       <a href="'.$bm_author_donate_url.'" title="Donate Bitcoin to '.$bm_author_name.'"><img src="'.plugins_url( 'images/donate.png' , __FILE__ ).'" alt="Donate" class="bitmate-author-donate-button"/></a>
       '. $bm_author_credit .'
       </div>
       </div>
       ';
   
       if ( get_the_author_meta( 'bitcoin' ) ) { 
       return $content.= ($bm_donation_box);
       } 
   
       } else {
       return $content;
       }
       }
       ```
   
 * **FIX:**
 *     ```
       /* Add BitMate Donation Box After Posts */
       add_filter( 'the_content', 'bm_author_donation_box' );
   
       function bm_author_donation_box($content) {
   
       $display_options = get_option( 'bitmate_author_donations_display_options' );
   
       if( isset( $display_options['display_bm_post_box'] ) && $display_options[ 'display_bm_post_box' ] && !is_page() ) { 
   
       $bm_site_name = get_bloginfo( 'name' );
       $bm_author_name = get_the_author_meta( 'display_name' );
       $bm_post_url = get_permalink();
       $bm_author_bitcoin = get_the_author_meta( 'bitcoin' );
       $bm_author_donate_url = 'bitcoin:'. $bm_author_bitcoin.'?label=Donation-from%3A'. urlencode($bm_post_url) .'&message=Donation-from%3A'. urlencode($bm_post_url) .'';
   
       if( isset( $display_options['display_bm_author_credit'] ) && $display_options[ 'display_bm_author_credit' ] ) {
       $bm_author_credit = '<br/><small class="bitmate-author-credit"><a href="http://bitmate.net/author-donations/" rel="nofollow" class="bitmate-author-credit">Powered by BitMate Author Donations</a></small>';
       } else {
       $bm_author_credit = '';
       }
   
       $bm_donation_box='
       <div class="bitmate-author-donation">
       <div class="bitmate-author-scan">
       <a href="'.$bm_author_donate_url.'" title="Scan to Donate Bitcoin to '.$bm_author_name.'"><img src="http://chart.googleapis.com/chart?chs=150x150&cht=qr&chld=H|0&chl='.$bm_author_donate_url.'" alt="Scan to Donate Bitcoin" /></a>
       </div>
       <div class="bitmate-author-description">
       <strong>Ti piace?</strong> Donata Bitcoin a <a href="'. get_author_posts_url( get_the_author_meta( 'ID' ) ) .'" title="'. $bm_author_name .'" rel="author">'. $bm_author_name .'</a> :
       <br/>
       <a href="'.$bm_author_donate_url.'" title="Donate Bitcoin to '. $bm_author_name .'"><img src="'.plugins_url( 'images/bitcoin.png' , __FILE__ ).'" alt="Bitcoin" /> <strong>'. $bm_author_bitcoin .'</strong></a></a>
       <br/>
       <a href="'.$bm_author_donate_url.'" title="Donate Bitcoin to '.$bm_author_name.'"><img src="'.plugins_url( 'images/donate.png' , __FILE__ ).'" alt="Donate" class="bitmate-author-donate-button"/></a>
       '. $bm_author_credit .'
       </div>
       </div>
       ';
   
       if ( get_the_author_meta( 'bitcoin' ) ) { 
       return $content.= ($bm_donation_box);
       } 
       }
   
       return $content;
       }
       ```
   
 * Thanks to the author of the fix (Dion), creator of **BRIDGEDD ** [http://bridgedd.com/](http://bridgedd.com/)
 *  Plugin Author [Daniel McClure](https://wordpress.org/support/users/danielmcclure/)
 * (@danielmcclure)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/the_content-empty/#post-8526511)
 * Thanks for sharing your results. I’ve actually implemented the fix in a slightly
   different way and everything should work as expected in the latest version and
   has been tested to WP 4.7.

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

The topic ‘the_content EMPTY’ is closed to new replies.

 * ![](https://ps.w.org/bitmate-author-donations/assets/icon-256x256.png?rev=1816875)
 * [BitMate Author Donations](https://wordpress.org/plugins/bitmate-author-donations/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bitmate-author-donations/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bitmate-author-donations/)
 * [Active Topics](https://wordpress.org/support/plugin/bitmate-author-donations/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bitmate-author-donations/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bitmate-author-donations/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Daniel McClure](https://wordpress.org/support/users/danielmcclure/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/the_content-empty/#post-8526511)
 * Status: resolved