Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
ShareThis in the thematic_postheader_postmeta issue « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

ShareThis in the thematic_postheader_postmeta issue

(6 posts)
  • Started 3 years ago by goboygodesign
  • Latest reply from initialsbr
  • This topic is resolved

  1. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    goboygodesign

    Member

    So I am having a strange issue - I added a custom function to append the sharethis buttons to the post-header meta and it puts it there without any problem, but it somehow also adds a random title and permalink above the post content as well and I can't figure out why it would do that. I'm using the latest version of the sharethis plugin with auto-add turned off and this code to add the buttons to my postheader:

    function my_sharefb() {
    	$postmeta = '<span class="st_facebook" st_title="' . the_title() . '" st_url="' . the_permalink() . '" ></span>';
    	return $postmeta;
    }
    
    function my_sharetw() {
    	$postmeta = '<span class="st_twitter" st_title="' . the_title() . '" st_url="' . the_permalink() . '" ></span>';
    	return $postmeta;
    }
    
    function my_shareem() {
    	 $postmeta = '<span class="st_email" st_title="' . the_title() . '" st_url="' . the_permalink() . '" ></span>';
    	 return $postmeta;
    }
    
    function my_sharethis() {
    	$postmeta = '<span class="st_sharethis" st_title="' . the_title() . '" st_url="' . the_permalink() . '" ></span>';
    	return $postmeta;
    }
    
    function my_postmeta() {
        $postmeta = '<div class="entry-meta">';
        $postmeta .= thematic_postmeta_authorlink();
        $postmeta .= '<span class="meta-sep meta-sep-entry-date"> | </span>';
        $postmeta .= thematic_postmeta_entrydate();
    	$postmeta .= ' <span class="meta-sep meta-sep-tweetmeme">|</span> ';
    	$postmeta .= my_sharefb();
    	$postmeta .= my_sharetw();
    	$postmeta .= my_shareem();
    	$postmeta .= my_sharethis();
    	$postmeta .= '</span>';
        $postmeta .= thematic_postmeta_editlink();
        $postmeta .= "</div><!-- .entry-meta -->\n";
    
        return $postmeta;
    }
    add_filter('thematic_postheader_postmeta', 'my_postmeta');

    Take a look at the output:

    http://www.polariscounseling.com/2011/08/five-great-ways-to-show-your-spouse-you-love-them/

    Any ideas?

    Posted 3 years ago #

  2. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    b/c the_title() and the_permalink() ECHO out their values by default... so they spit out titles and permalinks as soon as those functions are encountered. you need to RETURN values instead using

    get_the_title() and i think, get_permalink()

    also i can't think of a reason why you need to separate out the my_sharefb() function. just roll it into my_postmeta()

    Posted 3 years ago #

  3. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    goboygodesign

    Member

    Amazing! Thank you I've been racking my brain trying to figure that one out. The only reason I split all those functions off was to try to trace the issue (with no luck). Thanks!

    Posted 3 years ago #
  4. initialsbr
    Member

    I'm trying to do this same thing and was wondering what the final code looked like for you, goboygodesign. Thanks!

    Posted 3 years ago #

  5. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    it's the same code probably except following my advice to replace the_title() with get_the_title() and replacing the_permalink() with get_permalink()

    Posted 3 years ago #
  6. initialsbr
    Member

    Gotcha! That's what I thought you were saying, but I was stupidly trying "get_the_permalink" and it was breaking the site. Thanks helgatheviking!

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183