WordPress.org

Ready to get started?Download WordPress

Forums

User Submitted Posts
[resolved] I want to add some codes before and after textarea (content) (11 posts)

  1. lestat26
    Member
    Posted 6 months ago #

    I want to add some codes before and after textarea in content on submitted form. How can I do that.

    Example:
    <textarea><img="(content)"/></textarea>

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

  2. Jeff Starr
    Member
    Plugin Author

    Posted 6 months ago #

    Sure! Check out the file, /views/submission-form.php, which contains all the markup for the submission form. There you can make any edits as required.

  3. lestat26
    Member
    Posted 6 months ago #

    Actually I want to do like this.

    <img="<textarea>(content)</textarea>"/>

  4. Jeff Starr
    Member
    Plugin Author

    Posted 6 months ago #

    Sorry, I still don't understand.. I want to help, but cannot decipher the codes..

  5. lestat26
    Member
    Posted 6 months ago #

    Ok. I change "content" field to "img url" field in submission form. This field only for image url. After written and submit form I wantto show image on post. So I just want to when displaying post, I want to keep content between the tags(<img> - </img>). Hope I could tell. Thank you for your help.

  6. Jeff Starr
    Member
    Plugin Author

    Posted 6 months ago #

    So, something like this?

    <img src="<?php the_content(); ?>" />

  7. lestat26
    Member
    Posted 6 months ago #

    Yess. But that code doesn't work. Do you know another way for do that?

  8. Jeff Starr
    Member
    Plugin Author

    Posted 6 months ago #

    It should work if the content is available and the code is included in the WP loop.. if not, where is it failing for you?

  9. lestat26
    Member
    Posted 6 months ago #

    I don't know. Doesn't showing image. I think there is "<p> </p>" codes in content.

  10. Jeff Starr
    Member
    Plugin Author

    Posted 6 months ago #

    Try adding to functions.php:

    remove_filter('the_content', 'wpautop');

    That will disable the auto-formatting (<p>'s and such) in all content.

  11. lestat26
    Member
    Posted 6 months ago #

    Ok man thank you so much. You are interesting your plugin . You are the man. :)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.