Forums

Add a shortcode after every post (9 posts)

  1. 8bitkid
    Member
    Posted 1 year ago #

    i am trying to find a plugin that will allow me to insert shortcodes into every post. i know i can do this via the templates, but want to make sure it will survive upgrades and theme changes.

    any recommendations?

  2. elfin
    Moderator
    Posted 1 year ago #

    add a shortcode into every post?

    or add something after the content of every post?

  3. 8bitkid
    Member
    Posted 1 year ago #

    i need to add shortcodes for twitter and FB liking at the end of every post. this could come immediately after the content or as the final inclusion of the content.

  4. elfin
    Moderator
    Posted 1 year ago #

    In that case a shortcode maybe the wrong thing to use, look at filtering the_content and adding your icons that way.

  5. 8bitkid
    Member
    Posted 1 year ago #

    the reason i am looking to use shortcodes to insert the buttons is that i can easily strip them out of the WPTouch theme so they don't show up on mobile.

  6. elfin
    Moderator
    Posted 1 year ago #

    you can remove filters as well.

  7. Curtiss Grymala
    Member
    Posted 1 year ago #

    Look at the do_shortcode() function. That should help you do what you want.

  8. 8bitkid
    Member
    Posted 1 year ago #

    the problem is with how the FB Like inserts the filter into the content that makes it difficult to pull out due to its use of variables. unfortunately, it is the only plugin I have found that works a specific way.

    essentially, i am looking for a plugin that will insert the shortcode for me without having to edit my template files.

  9. Middle8Media
    Member
    Posted 1 year ago #

    Hey Curtiss,

    What do you mean "Look at the do_shortcode() function?

    Would deleting that allow shortcodes to show up in WPtouch 1.9?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags