Add shortcode automatically to all my posts (3 posts)

  1. vishnudath
    Posted 3 years ago #

    i want to add a shortcode automatically in all my posts after X number of words (50words).

    shortcode is >> [like]

    please let me know how can i do that

  2. michael.mariart
    Posted 3 years ago #

    Look at the filter for the_content. - http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content

    That will let you get the content and apply whatever action you need to it.

  3. vishnudath
    Posted 3 years ago #

    michael, thanks for the reply :)

    but i'm not good in this PHP :(

    can you help in getting the code, which can automatically add[l2g] after 50 words and [/l2g] at the end of last word in all my articles.

Topic Closed

This topic has been closed to new replies.

About this Topic