WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using a plugin to add tweet, likes... This plugin add filters to the_content() to display this social buttons on a blog page (list of posts).

I coded a shortcode which does a custom SQL query which displays posts. I even added apply_filters( 'the_content', get_the_content() ) for these filters to be applied on get_the_content(). I added the shortcode on a page. The only one problem is that the buttons "like", "tweet" are not "linked" to the different posts but to the page.

For instance, on one post, i have 2 likes and 10 tweets in a normal way and they are displayed on this page with a count of 0. I believe this buttons are in fact linked to the page and not to the posts. I tried with adding other plugins like voting, it is the same: the vote on the posts are not displayed..

I just want this buttons to be displayed like in a normal post loop. Is it a way to add this filters on the_content() in the shortcode loop and not in the the_content in the page. The blog list works well, votes and buttons are correctly displayed. I want the same behavior on a page with a shortcode displaying posts, is it possible?

Thank you for your answers!

share|improve this question
up vote 1 down vote accepted

I found an alternative solution, I had just to use a new template with the loop to avoid this problem witha loop in shortcodes and everything works well for now.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.