Post Share Buttons
Support Area › Forums › Live › Post Share Buttons
- This topic has 6 replies, 2 voices, and was last updated 9 years, 11 months ago by Bill Robbins.
-
AuthorPosts
-
May 22, 2014 at 07:21 #19629Shannon VasilindaParticipant
So I messed up my Posts page code. Was trying to get rid of the share buttons below the posts and whatever I did made it so I can’t password protect the post. Here is the code from the editor after I deleted the code I thought I didn’t want: Using an older version of Live. 2.0
Have since updated my download of it and no longer have the correct code to replace it with. Can you tell me what I am missing to get the password protection back please. Thanks<?php get_header(); ?>
<div id=”page-left”>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?><div class=”time”><h4><?php the_time(‘F j, Y’); ?></h4></div>
<h1><?php the_title(); ?></h1>
<?php the_content(__(‘[Read more]’));?>
<div class=”clear”></div>
<div class=”share”>
<h4>Share This On:
<span class=”share-links”>
<?php the_permalink(); ?>” title=”Share this article with your Twitter followers”>/images/twitter.png” alt=”Tweet This” /></span>
</h4>
</div><div class=”clear”></div>
<?php endwhile; else: ?><p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p><?php endif; ?>
<div class=”clear”></div>
</div>
<div class=”clear”></div><?php get_footer(); ?>
May 22, 2014 at 08:40 #19633Bill RobbinsModeratorHello Shannon,
No problem. I’ve pasted the original code for the single.php file below:
If I can help out, just let me know.
Thanks,
BillMay 22, 2014 at 22:54 #19660Shannon VasilindaParticipantSo I got the password protection working now but the media that is being protected (an mp3file) isn’t showing up in the post.
Also the code above is for the latest version of Live. Does it matter?
I have an earlier version that I haven’t updated. Mainly because I was stupid and didn’t make a parent theme first.May 22, 2014 at 22:58 #19661Shannon VasilindaParticipantAnd I also need the share buttons removed from the Posts
Trying to do that is what got me in this mess in the first place. 🙂May 23, 2014 at 10:13 #19668Bill RobbinsModeratorShannon,
That’s actually the code straight from version 2.0. In 3.0 we removed the sharing buttons and rebuilt things basically from the ground up. It’s code looks very different from this now.
I’m not much of an expert on password protecting posts. When you say you can’t protect the MP3 file are you indicating that the file is still visible without entering the password or that you can’t see it even after the password is entered?
You can still take out the sharing buttons. Just delete this section from the single.php file:
<div class="share"> <h4>Share This On: <span class="share-links"> <a rel="nofollow" href="http://delicious.com/post?url=<?php the_permalink(); ?>&title=<?php echo urlencode(get_the_title($id)); ?>" title="Bookmark this post at Delicious"><img class="fix" src="<?php bloginfo('template_url'); ?>/images/delicious.png" alt="Bookmark at Delicious" /></a> <a rel="nofollow" href="http://digg.com/submit?phase=2&url=<?php the_permalink(); ?>" title="Submit this post to Digg"><img class="fix" src="<?php bloginfo('template_url'); ?>/images/digg.png" alt="Digg This!" /></a> <a rel="nofollow" href="http://twitter.com/home?status=<?php echo urlencode("Currently reading: "); ?><?php the_permalink(); ?>" title="Share this article with your Twitter followers"><img class="fix" src="<?php bloginfo('template_url'); ?>/images/twitter.png" alt="Tweet This" /></a> <a rel="nofollow" href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php echo urlencode(get_the_title($id)); ?>" title="Share this post at StumbleUpon"><img class="fix" src="<?php bloginfo('template_url'); ?>/images/stumbleupon.png" alt="Stumble This!" /></a> <a rel="nofollow" href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php echo urlencode(get_the_title($id)); ?>" title="Share this post on Facebook"><img class="fix" src="<?php bloginfo('template_url'); ?>/images/facebook.png" alt="Share on Facebook" /></a> <a rel="nofollow" href="http://reddit.com/submit?url=<?php the_permalink(); ?>&title=<?php echo urlencode(get_the_title($id)); ?>" title="Share this post on Reddit"><img class="fix" src="<?php bloginfo('template_url'); ?>/images/reddit.png" alt="Share on Reddit" /></a> </span> </h4> </div> <div class="clear"></div>
and that should do it.
Thanks,
BillMay 30, 2014 at 14:22 #19807Shannon VasilindaParticipantI think I got it. Not sure what I did different but it works now.
🙂
Shannon
May 30, 2014 at 14:47 #19809Bill RobbinsModeratorFantastic. Enjoy your weekend Shannon.
-
AuthorPosts
- The topic ‘Post Share Buttons’ is closed to new replies.