WordPress.org

Forums

User Submitted Posts
[resolved] how to paste code (css, php, html, etc...) in Post content Area (9 posts)

  1. teleanu
    Member
    Posted 8 months ago #

    how to paste code (css, php, html, etc...) in Post content Area and to show the code with syntax highlights? It's this possible?

    I want it to be posted as code

    https://wordpress.org/plugins/user-submitted-posts/

  2. Jeff Starr
    Member
    Plugin Author

    Posted 8 months ago #

    Are you referring to <code> tags? If so, code tags should remain intact and appear in post content. Otherwise, please let me know and I'll try to help.

  3. teleanu
    Member
    Posted 8 months ago #

    When the visitor uses the Post content Area and is pasting a php, css code, i want the form to post this as a code. I will use the User Submitted Posts in this context. As a paste code website. Like pastebin :)

  4. Jeff Starr
    Member
    Plugin Author

    Posted 8 months ago #

    When it comes to submitted content, there is no real difference between "code" and regular text -- it depends on how it is formatted. For example, wrapping a string or block of text with <code> and/or <pre> tags is the conventional way of displaying code, and USP accepts both in post content no problem.

  5. teleanu
    Member
    Posted 8 months ago #

    Was thinking if USP can have auto set for code or pre. I don't want people to use this tags. They must paste the php, css code & the USP form to publish it like he had put code or pre

  6. Jeff Starr
    Member
    Plugin Author

    Posted 8 months ago #

    ?

  7. teleanu
    Member
    Posted 8 months ago #

    edited. sorry :)

  8. Jeff Starr
    Member
    Plugin Author

    Posted 8 months ago #

    With the free version of USP, there is one content field, so it's all or nothing that way. For the Pro version, however, forms can have multiple content areas (i.e., textareas), so one of them could be set up specifically for the codes.

  9. teleanu
    Member
    Posted 8 months ago #

    Ok. Thank you for your answer.

Reply

You must log in to post.

About this Plugin

About this Topic