Email Share Button and Recent Posts Conflict
-
Hello. I added an email button to share the posts on my blog. The problem is that the email button does not send to the current post on the page but the last in-titled post from the “recent posts” section.
This is the code for the email button:
<a href="mailto:?subject=<?php the_title(); ?>&body=<?php the_permalink() ?>" title="Enviar Publicación Por Correo Electrónico!"><img src="https://lh5.googleusercontent.com/-SqTZFWFff3I/Tay1_ZsTnLI/AAAAAAAAAV4/61nwkeAau5k/email-t.png">
This is the code for “recent posts to be displayed at the end of the post:
Consejos Recientes En Este Blog:</b> <ul> <?php query_posts('showposts=3'); ?> <?php while (have_posts()) : the_post(); ?> <li><a>"><?php the_title(); ?></a></li> <li><?php the_excerpt(__('(more…)')); ?></li> <?php endwhile;?> </ul> <a href="https://www.ivanjaquez.com/noticias-y-consejos-sobre-marketing-en-internet/la-inversion-publicitaria-online-crecera-40-en-2011-en-la-argentina/">Here is a post from my site(spanish content)</a>
[Please post code snippets between backticks or use the code button.]
Thanks for your consideration ??
- The topic ‘Email Share Button and Recent Posts Conflict’ is closed to new replies.