Viewing 8 replies - 1 through 8 (of 8 total)
  • Jeff

    (@photoreview)

    Why don’t you use the shortcode [ssba]?

    Plugin Author Simple Share

    (@davidoffneal)

    Thanks again JP 🙂

    Hi David,

    I use the [ssba] shortcode for include the buttons on my homepage.
    But the url is not the permalink, is the url of the web.

    The website:
    http://www.elisavictoria.info/

    How can I solve this problem?
    Thank you and thanks for your plugin, i love it!

    Jeff

    (@photoreview)

    I think the shortcode must be placed within the loop, right David?

    Thanks, Jean Philippe.

    But if I use it out of the loop, how can I refer to the post? I want to share the permalink to the single post, not the homepage url.

    Thanks again,

    Jeff

    (@photoreview)

    Actually you can’t. If you use the shortcode out of the post loop, it’s normal that the link shared is the page url.

    Thanks, Jean-Philippe. The problem is my bad english 🙁
    I use inside the loop.

    This is my code

    <?php if (have_posts()) : while (have_posts()) :  the_post(); ?>
      	<article class="post">
      		<header>
      			<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
      			<time><?php the_time('d m Y'); ?> /</time>
      			<div class="categories">
    	  			<?php the_category( ',' ); ?>
      			</div>
      		</header>
    
      		<?php the_post_thumbnail('full'); ?>
      		<?php the_content(); ?>
    
      		<footer>
      			<div class="tags">
      				 <?php the_tags( '', ', ', '' ); ?>
      			</div>
    
      			<div class="share">
      				<?php echo do_shortcode('[ssba]'); ?>
      			</div>
      		</footer>
      	</article>
    
    <?php endwhile; endif; ?>
    Jeff

    (@photoreview)

    Hi,

    It would be great if David could answer you because, regarding your code, I would you say it should work but honestly I’m not good enough at coding PHP.

    Does everything work well if you insert SSBA shortcode just after <?php the_content(); ?> and before the entry footer?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘adding simple-share-buttons to home page’ is closed to new replies.