StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-21-2009, 02:55 PM
tscholes tscholes is offline
Registered User
Pro Plus Member
 
Join Date: Feb 2009
Posts: 14
Default Home Page Preview Posts & Facebook Share Widget

Hello,

We have customized our code on our home page to display a combination of videos and pictures on the bottom section. Everything was working great until we added the Facebook Sharecount widget.

http://vaclassroomblog.com/

The issue is that now you see the code for the widget in the preview of the content for the teaser posts on the bottom, example:

(heading: training tidbits; title: Five Reasons I love Facebook Fan Pages) you see the following in the description:

Quote:
var fbShare = {url: 'http://vaclassroomblog.com/five-reasons-i-love-facebook-fan-pages', title: 'Five Reasons I Love Facebook Fan Pages', google_analytics: 'true'}

Of course this varies each time depending on the post. Question, is there a code I can insert to avoid this. Here it is currently:

Code:
<?php function the_content_limit($max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
    $content = get_the_content($more_link_text, $stripteaser, $more_file);
    $content = apply_filters('the_content', $content);
    $content = str_replace(']]>', ']]&gt;', $content);
    $content = strip_tags($content);

   if (strlen($_GET['p']) > 0) {
      echo "

";
      echo $content;
      echo "<a href='";
      the_permalink();
      echo "'>"."Read More &rarr;</a>";
      echo "</p>";
   }
   else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) {
        $content = substr($content, 0, $espacio);
        $content = $content;
        echo "

";
        echo $content;
        echo "...";
        echo "<a href='";
        the_permalink();
        echo "'>".$more_link_text."</a>";
        echo "</p>";
   }
   else {
      echo "

";
      echo $content;
      echo "<a href='";
      the_permalink();
      echo "'>"."Read More &rarr;</a>";
      echo "</p>";
   }
}

?>

They do have a manual option to enter this widget - what would be the safest place to enter and where?

The TweetMeMe had no issues with this!

Thanks!
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How To ADD The Facebook share button teamturbo General Discussion 3 10-29-2009 08:44 PM
facebook share button kevmarl General Discussion 1 10-28-2009 07:06 AM


All times are GMT -5. The time now is 06:33 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.