Can someone please help me with this code?

Discussion in 'Programming' started by Divvy, Oct 19, 2011.

  1. #1
    Hello friends,

    Can someone could help me with a little code in my wordpress website?
    My website: www.estapessoa.com
    Theme: Gallery from UpThemes

    Please visit my website, when you pass with your mouse over an image, you will see the post title below.
    I want to replace that (title) with a facebook share button.

    I already have the facebook code, only need help adding the code :)

    Please take a look at the code:
    <div id="post-<?php the_ID() ?>" <?php echo post_class($vidclass); ?>>
    			<div class="entry-content">
    			<?php childtheme_post_header() ?>
            	<a href="<?php echo the_permalink() ?>">
            	<span class="slide-title"><?php echo the_title(); ?></span>
            	<?php 
    			
    			$thumbnail = get_post_meta($post->ID, 'thumbnail', true);
    			
    			if( $thumbnail ):
    				echo '<img class="attachment-thumbnail" src="' .get_post_meta($post->ID, 'thumbnail', true) . '" width="125" height="125" alt="' . get_the_title() .'" /></a>';
            	elseif( has_post_thumbnail() ): 
            		the_post_thumbnail('thumbnail');
            	else:
    				echo '<img class="attachment-thumbnail" src="' . get_bloginfo('stylesheet_directory') . '/images/thumbnail-default.jpg" width="125" height="125" alt="' . get_the_title() .'" />';	        	
            	endif;
            	?>
            	</a>
    		  </div>
    		</div><!-- .post -->
    Code (markup):
    This is the code line that makes the title appear:
    <span class="slide-title"><?php echo the_title(); ?></span>
    Code (markup):
    Can someone please help me?

    I tried to replace this:
    <span class="slide-title"><?php echo the_title(); ?></span>
    Code (markup):
    with this:
    <span class="slide-title"><a name="fb_share"></a> 
    <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" 
            type="text/javascript">
    </script></span>
    Code (markup):
    Also tried this wordpress plugin but got same problem:
    http://wordpress.org/extend/plugins/facebook-share-new/

    Can someone please help me?
    Thank you!
     
    Divvy, Oct 19, 2011 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    What is


    <a name="fb_share"></a>

    It looks like an improperly formed anchor tag, but it's not going to do anything.
     
    Rukbat, Oct 21, 2011 IP