Skip to main content
Data sanitized
Source Link
OriginalEXE
  • 611
  • 7
  • 14

First of all, you never closed your php tags.

Second of all, do not call functions each time for each social icon. Save values in the variables instead to speed up the process.

It would go something like this:

<?php function my_social_buttons() {
    
    $title = esc_attr( get_the_title() );
    $permalink = esc_attr( get_the_permalink() );
    $directory = get_template_directory_uri();
    
    ?>
    <strong>Deel die pos met ander</strong>
    <a href="http://www.facebook.com/sharer.php?u=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="Share on Facebook.">
    <img src="<?php echo $directory; ?>/images/facebook.png" alt="Share on Facebook" id="sharethis-last" /></a>
    <a href="http://twitter.com/home/?status=<?php echo $title; ?> : <?php echo $permalink; ?>" title="Tweet this!">
    <img src="<?php echo $directory; ?>/images/twitter.png" alt="Tweet this!" /></a>
    <a href="http://www.google.com/bookmarks/mark?op=edit&bkmk=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="Google+1.">
    <img src="<?php echo $directory; ?>/images/google.png" alt="Google+1" id="Google+1" /></a>
    <a href="http://www.stumbleupon.com/submit?url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="StumbleUpon.">
    <img src="<?php echo $directory; ?>/images/stumbleupon.png" alt="StumbleUpon" /></a>
    <a href="http://digg.com/submit?phase=2&amp;amp;url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="Digg this!">
    <img src="<?php echo $directory; ?>/images/digg.png" alt="Digg This!" /></a>               
    <a href="http://del.icio.us/post?url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="Bookmark on Delicious.">
    <img src="<?php echo $directory; ?>/images/delicious.png" alt="Boekmerk op Delicious" /></a>
    <a href="https://mail.google.com/mail/?view=cm&fs=1&to&su=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="epos.">
    <img src="<?php echo $directory; ?>/images/gmail.png" alt="epos" id="epos dit" /></a> 
    
    <?php
    
}

First of all, you never closed your php tags.

Second of all, do not call functions each time for each social icon. Save values in the variables instead to speed up the process.

It would go something like this:

<?php function my_social_buttons() {
    
    $title = get_the_title();
    $permalink = get_the_permalink();
    $directory = get_template_directory_uri();
    
    ?>
    <strong>Deel die pos met ander</strong>
    <a href="http://www.facebook.com/sharer.php?u=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="Share on Facebook.">
    <img src="<?php echo $directory; ?>/images/facebook.png" alt="Share on Facebook" id="sharethis-last" /></a>
    <a href="http://twitter.com/home/?status=<?php echo $title; ?> : <?php echo $permalink; ?>" title="Tweet this!">
    <img src="<?php echo $directory; ?>/images/twitter.png" alt="Tweet this!" /></a>
    <a href="http://www.google.com/bookmarks/mark?op=edit&bkmk=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="Google+1.">
    <img src="<?php echo $directory; ?>/images/google.png" alt="Google+1" id="Google+1" /></a>
    <a href="http://www.stumbleupon.com/submit?url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="StumbleUpon.">
    <img src="<?php echo $directory; ?>/images/stumbleupon.png" alt="StumbleUpon" /></a>
    <a href="http://digg.com/submit?phase=2&amp;amp;url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="Digg this!">
    <img src="<?php echo $directory; ?>/images/digg.png" alt="Digg This!" /></a>               
    <a href="http://del.icio.us/post?url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="Bookmark on Delicious.">
    <img src="<?php echo $directory; ?>/images/delicious.png" alt="Boekmerk op Delicious" /></a>
    <a href="https://mail.google.com/mail/?view=cm&fs=1&to&su=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="epos.">
    <img src="<?php echo $directory; ?>/images/gmail.png" alt="epos" id="epos dit" /></a> 
    
    <?php
    
}

First of all, you never closed your php tags.

Second of all, do not call functions each time for each social icon. Save values in the variables instead to speed up the process.

It would go something like this:

<?php function my_social_buttons() {
    
    $title = esc_attr( get_the_title() );
    $permalink = esc_attr( get_the_permalink() );
    $directory = get_template_directory_uri();
    
    ?>
    <strong>Deel die pos met ander</strong>
    <a href="http://www.facebook.com/sharer.php?u=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="Share on Facebook.">
    <img src="<?php echo $directory; ?>/images/facebook.png" alt="Share on Facebook" id="sharethis-last" /></a>
    <a href="http://twitter.com/home/?status=<?php echo $title; ?> : <?php echo $permalink; ?>" title="Tweet this!">
    <img src="<?php echo $directory; ?>/images/twitter.png" alt="Tweet this!" /></a>
    <a href="http://www.google.com/bookmarks/mark?op=edit&bkmk=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="Google+1.">
    <img src="<?php echo $directory; ?>/images/google.png" alt="Google+1" id="Google+1" /></a>
    <a href="http://www.stumbleupon.com/submit?url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="StumbleUpon.">
    <img src="<?php echo $directory; ?>/images/stumbleupon.png" alt="StumbleUpon" /></a>
    <a href="http://digg.com/submit?phase=2&amp;amp;url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="Digg this!">
    <img src="<?php echo $directory; ?>/images/digg.png" alt="Digg This!" /></a>               
    <a href="http://del.icio.us/post?url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="Bookmark on Delicious.">
    <img src="<?php echo $directory; ?>/images/delicious.png" alt="Boekmerk op Delicious" /></a>
    <a href="https://mail.google.com/mail/?view=cm&fs=1&to&su=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="epos.">
    <img src="<?php echo $directory; ?>/images/gmail.png" alt="epos" id="epos dit" /></a> 
    
    <?php
    
}
Corrected tags
Source Link
OriginalEXE
  • 611
  • 7
  • 14

First of all, you never closed your php tags.

Second of all, do not call functions each time for each social icon. Save values in the variables instead to speed up the process.

It would go something like this:

<?php function my_social_buttons() {
    
    $title = get_the_title();
    $permalink = get_the_permalink();
    $directory = get_template_directory_uri();
    
    ?>
    <strong>Deel die pos met ander</strong><p </p>strong>
    <a href="http://www.facebook.com/sharer.php?u=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="Share on Facebook.">
    <img src="<?php echo $directory; ?>/images/facebook.png" alt="Share on Facebook" id="sharethis-last" /></a>
    <a href="http://twitter.com/home/?status=<?php echo $title; ?> : <?php echo $permalink; ?>" title="Tweet this!">
    <img src="<?php echo $directory; ?>/images/twitter.png" alt="Tweet this!" /></a>
    <a href="http://www.google.com/bookmarks/mark?op=edit&bkmk=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="Google+1.">
    <img src="<?php echo $directory; ?>/images/google.png" alt="Google+1" id="Google+1" /></a>
    <a href="http://www.stumbleupon.com/submit?url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="StumbleUpon.">
    <img src="<?php echo $directory; ?>/images/stumbleupon.png" alt="StumbleUpon" /></a>
    <a href="http://digg.com/submit?phase=2&amp;amp;url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="Digg this!">
    <img src="<?php echo $directory; ?>/images/digg.png" alt="Digg This!" /></a>               
    <a href="http://del.icio.us/post?url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="Bookmark on Delicious.">
    <img src="<?php echo $directory; ?>/images/delicious.png" alt="Boekmerk op Delicious" /></a>
    <a href="https://mail.google.com/mail/?view=cm&fs=1&to&su=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="epos.">
    <img src="<?php echo $directory; ?>/images/gmail.png" alt="epos" id="epos dit" /></a> 
    
    <?php
    
}

First of all, you never closed your php tags.

Second of all, do not call functions each time for each social icon. Save values in the variables instead to speed up the process.

It would go something like this:

<?php function my_social_buttons() {
    
    $title = get_the_title();
    $permalink = get_the_permalink();
    $directory = get_template_directory_uri();
    
    ?>
    <strong>Deel die pos met ander</strong><p </p>
    <a href="http://www.facebook.com/sharer.php?u=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="Share on Facebook.">
    <img src="<?php echo $directory; ?>/images/facebook.png" alt="Share on Facebook" id="sharethis-last" /></a>
    <a href="http://twitter.com/home/?status=<?php echo $title; ?> : <?php echo $permalink; ?>" title="Tweet this!">
    <img src="<?php echo $directory; ?>/images/twitter.png" alt="Tweet this!" /></a>
    <a href="http://www.google.com/bookmarks/mark?op=edit&bkmk=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="Google+1.">
    <img src="<?php echo $directory; ?>/images/google.png" alt="Google+1" id="Google+1" /></a>
    <a href="http://www.stumbleupon.com/submit?url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="StumbleUpon.">
    <img src="<?php echo $directory; ?>/images/stumbleupon.png" alt="StumbleUpon" /></a>
    <a href="http://digg.com/submit?phase=2&amp;amp;url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="Digg this!">
    <img src="<?php echo $directory; ?>/images/digg.png" alt="Digg This!" /></a>               
    <a href="http://del.icio.us/post?url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="Bookmark on Delicious.">
    <img src="<?php echo $directory; ?>/images/delicious.png" alt="Boekmerk op Delicious" /></a>
    <a href="https://mail.google.com/mail/?view=cm&fs=1&to&su=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="epos.">
    <img src="<?php echo $directory; ?>/images/gmail.png" alt="epos" id="epos dit" /></a> 
    
    <?php
    
}

First of all, you never closed your php tags.

Second of all, do not call functions each time for each social icon. Save values in the variables instead to speed up the process.

It would go something like this:

<?php function my_social_buttons() {
    
    $title = get_the_title();
    $permalink = get_the_permalink();
    $directory = get_template_directory_uri();
    
    ?>
    <strong>Deel die pos met ander</strong>
    <a href="http://www.facebook.com/sharer.php?u=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="Share on Facebook.">
    <img src="<?php echo $directory; ?>/images/facebook.png" alt="Share on Facebook" id="sharethis-last" /></a>
    <a href="http://twitter.com/home/?status=<?php echo $title; ?> : <?php echo $permalink; ?>" title="Tweet this!">
    <img src="<?php echo $directory; ?>/images/twitter.png" alt="Tweet this!" /></a>
    <a href="http://www.google.com/bookmarks/mark?op=edit&bkmk=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="Google+1.">
    <img src="<?php echo $directory; ?>/images/google.png" alt="Google+1" id="Google+1" /></a>
    <a href="http://www.stumbleupon.com/submit?url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="StumbleUpon.">
    <img src="<?php echo $directory; ?>/images/stumbleupon.png" alt="StumbleUpon" /></a>
    <a href="http://digg.com/submit?phase=2&amp;amp;url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="Digg this!">
    <img src="<?php echo $directory; ?>/images/digg.png" alt="Digg This!" /></a>               
    <a href="http://del.icio.us/post?url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="Bookmark on Delicious.">
    <img src="<?php echo $directory; ?>/images/delicious.png" alt="Boekmerk op Delicious" /></a>
    <a href="https://mail.google.com/mail/?view=cm&fs=1&to&su=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="epos.">
    <img src="<?php echo $directory; ?>/images/gmail.png" alt="epos" id="epos dit" /></a> 
    
    <?php
    
}
Source Link
OriginalEXE
  • 611
  • 7
  • 14

First of all, you never closed your php tags.

Second of all, do not call functions each time for each social icon. Save values in the variables instead to speed up the process.

It would go something like this:

<?php function my_social_buttons() {
    
    $title = get_the_title();
    $permalink = get_the_permalink();
    $directory = get_template_directory_uri();
    
    ?>
    <strong>Deel die pos met ander</strong><p </p>
    <a href="http://www.facebook.com/sharer.php?u=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="Share on Facebook.">
    <img src="<?php echo $directory; ?>/images/facebook.png" alt="Share on Facebook" id="sharethis-last" /></a>
    <a href="http://twitter.com/home/?status=<?php echo $title; ?> : <?php echo $permalink; ?>" title="Tweet this!">
    <img src="<?php echo $directory; ?>/images/twitter.png" alt="Tweet this!" /></a>
    <a href="http://www.google.com/bookmarks/mark?op=edit&bkmk=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="Google+1.">
    <img src="<?php echo $directory; ?>/images/google.png" alt="Google+1" id="Google+1" /></a>
    <a href="http://www.stumbleupon.com/submit?url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="StumbleUpon.">
    <img src="<?php echo $directory; ?>/images/stumbleupon.png" alt="StumbleUpon" /></a>
    <a href="http://digg.com/submit?phase=2&amp;amp;url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="Digg this!">
    <img src="<?php echo $directory; ?>/images/digg.png" alt="Digg This!" /></a>               
    <a href="http://del.icio.us/post?url=<?php echo $permalink; ?>&amp;amp;title=<?php echo $title; ?>" title="Bookmark on Delicious.">
    <img src="<?php echo $directory; ?>/images/delicious.png" alt="Boekmerk op Delicious" /></a>
    <a href="https://mail.google.com/mail/?view=cm&fs=1&to&su=<?php echo $permalink;?>&amp;amp;t=<?php echo $title; ?>" title="epos.">
    <img src="<?php echo $directory; ?>/images/gmail.png" alt="epos" id="epos dit" /></a> 
    
    <?php
    
}