WordPress.org

Forums

Ability to have blocks of code on a post (7 posts)

  1. Dave P.
    Member
    Posted 7 years ago #

    There should really be a feature or plugin that allows you to plug in bits of any sort of code into a post without having WordPress modify the code. For example if I wanted to post a video or a targeted ad into a post, currently I have to change to non-WYISWYG mode...add the code. If I press save and then in the future go back and make changes in WYSISYG mode, WordPress has deleted the ad code that I had put in! No good!

    A simple block like the "code" block would be perfect, that allows you to put any sort of code without WordPress making modifications to it.

    Is there something like this out there? If not, does anybody have the same gripes I do?

  2. Doodlebee
    Member
    Posted 7 years ago #

    I do it all the time.

    <code></code>

    I would, however, be sure you change any "<" tags to "&lt ;". (remove the space - the forum keeps changing it!)

    But yes, it would be nice to be able to not have to make that change every time you wanted to post code. but it works in the interim.

  3. Dave P.
    Member
    Posted 7 years ago #

    I just tried it right now, and WordPress still modified my code....in fact it took it out of the tags after switching to WYSIWYG mode. There should be something that tells wordpress to ignore the code, and just parse it in HTML mode.

  4. Doodlebee
    Member
    Posted 7 years ago #

    Are you using the WYSIWYG editor? Igh. I wouldn't do that. I always turn that sucker off. It's annoying.

  5. Dave P.
    Member
    Posted 7 years ago #

    Yup, for the majority of the content I do, the WYISWYG editor makes things faster/easier. I can see now that for code stuff, it may be better not to use it anymore lol.

  6. Dave P.
    Member
    Posted 7 years ago #

    Actually, one of my biggest gripes for code version is there is no div or align buttons. If I want to float something right, I have to write the code.

    Just a pain to me.

  7. Doodlebee
    Member
    Posted 7 years ago #

    You can make your own quicktags. *That* is easy.

    Open up quicktags.js and just add in what you want.

Topic Closed

This topic has been closed to new replies.

About this Topic