• mattread

    (@mattread)


    Does anyone know if there is a hack to DISPLAY HTML code in the post content, something like backticks on this forum??
    If not, does anyone feel like writing one? I will give you autographed picture of Fred if you write one!! If that’s not enough motivation, then I don’t know what is. πŸ™‚ πŸ™‚
    I run the tweaks/software section of my site with wordpress and put a lot of HTML in the posts, and currently have to convert everything to Special Characters.
    http://www.mattread.com/tweaks/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Anonymous

    How about html or scripts in the sidebar.
    I want to run a countdown code and other stuff, but I don’t know how to include it in my sidebar…
    Any help would be appreciated.
    Thanks
    Nettie xox
    http://keanuholic.com

    I use the WP widget:
    http://resources.ww.wp.xz.cn/tools/encode/
    but a plugin would be cool.

    ringmaster

    (@ringmaster)

    Here you go, “Code Filter”:
    http://www.asymptomatic.net/wp-hacks/
    Where’s my picture?

    One thing to note :
    Break your code up into smaller lines, or it will continue to the right !

    Thread Starter mattread

    (@mattread)

    That Plugin is awsome. That’s exactly what I wanted, and I do mean exactly.
    Oh and here’s your picture:
    http://www.mattread.com/i/mfr.jpg
    “It’s a wonderful day in the neighboorhood….”

    ringmaster

    (@ringmaster)

    Sweet. πŸ™‚

    Zarniwoop

    (@zarniwoop)

    Maybe you can also try out the Markdown plugin (included with WP) which has support for displaying code and doesn’t even need the -tags. At the other side, it is much more than that and for this cannot be use in conjunction with Textile because they do the same things, but in different ways.

    Thread Starter mattread

    (@mattread)

    I have a problem with the Plugin. if I have more than on instance of the “code” tags then it displays the middle “code” tags as special characters.

    <html></>

    Plain Text

    The above will display “Plain Text” and the middle “code” tags as preformatted text <pre>

    ringmaster

    (@ringmaster)

    You can fix this by putting a “U” after the “ims” in the regular expression. The expression would then read like this:
    '|<code([^>]*)>(.*)|imsU'
    The “U” makes the expression ungreedy, so it only looks for the first matching end tag rather than the last.

    and how can I put code in the comments? I’ve tried using the code tag but it doesn’t work. Would a pre tag work?

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘HTML Code in Post’ is closed to new replies.