Automatic Text Replacement (5 posts)

  1. lowlight
    Posted 7 years ago #

    I would like to have certain words in my blog to be linked to glossary pages I will be adding, and in some cases I want some text to be replaced by images I will be using a lot. Rather than go through and manually add all these links, is there a plugin that will do it for me? Something that will spider my content, and find the words I add, with links defined manually?

  2. krembo99
    Posted 7 years ago #

    This plugin replaces words with anythigs (as the author say)


    So maybe you can use it to display images as well..
    Never tried it , and do not know how the HTML will be parsed.
    But at any rate, it is a simple function to write , to be added to your functions.php (only less flexible than the plug)

  3. krembo99
    Posted 7 years ago #

    Plugin Name: Replace word with image
    function replace ($text) {
    $text = str_replace('word', '
    <img src="next.jpg" /> ETC.ETC....
    ', $text);
    return $text;
    add_filter('the_content', 'replace'); ?>

    this is the basic plugin/function,
    Now if you want it to be flexible with an interface, some DB integration is needed, but if you only have 2-3 words, you can use simple functions.
    Nice idea for someone to develop though.

  4. lowlight
    Posted 7 years ago #

    I would definitely be adding a lot of words... For instance a deck of cards would have 52 entries in itself.. I just want to be able to say, write :Qh: and it will replace it with an image tag for the queen of hearts.

    If someone knows of a plugin, let me know!

  5. lowlight
    Posted 7 years ago #

    Well I just figured it out - just use smilies! There is a plugin that allows custom smiley management, so I am just using that.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.