WordPress.org

Forums

[resolved] How to replace text inside of posts and pages (3 posts)

  1. mistergin
    Member
    Posted 8 years ago #

    Hello!

    I'm looking to replace text that I put into my posts and pages.

    For example, if I put in ##funnypic## somewhere in the page/post text, I'd like to replace it with an html image.

    To avoid having the same code on several pages I imagine I'll need a function somewhere.

    Any recommendations on doing this? Each page outputs "the_content()" so I assume I need to alter that somehow with an str_replace()?

  2. Well, first I would suggest reading all the responses to your first thread on this subject:

    http://wordpress.org/support/topic/107990?replies=5

  3. mistergin
    Member
    Posted 8 years ago #

    How weird - I posted that yesterday but there was an error and I couldn't find the post again..

    n/m, thanks for the link!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags