WordPress.org

Ready to get started?Download WordPress

Forums

User Submitted Posts
[resolved] External URL (4 posts)

  1. behedwin
    Member
    Posted 6 months ago #

    I want visitors to submit a link (external URL).
    I have setup this plugin like this
    1. http://prntscr.com/2te01b and this means that the user submission form looks like this http://prntscr.com/2te0b9
    Only containing title and URL.

    But when i test it, i only get an empty post. Where did my URL go?
    How can i make all user submission to be created into a link to whatever link they wanted to share?

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

  2. Jeff Starr
    Member
    Plugin Author

    Posted 6 months ago #

    As explained in the readme and plugin documentation, URLs and other submitted data are attached to posts as custom fields. That way you can use them however is required in your theme.

  3. behedwin
    Member
    Posted 6 months ago #

    Ok so for someone like me with no programing background. How would i go about to use these custom fields to be displayed.

    My aim is to let anyone submit a title + link (url) and have it displayed in a list. I thought your plugin would be a good fit, but maybe it is not if i dont know how to use those custom fields and have any background in programing.

  4. Jeff Starr
    Member
    Plugin Author

    Posted 6 months ago #

    Basically to display custom fields you just add a snippet of code to your theme where you want the custom fields to display. The WordPress loop is a good place to try something like the following:

    <?php $key_1_value = get_post_meta( get_the_ID(), 'key_1', true );
    // check if the custom field has a value
    if ( ! empty( $key_1_value ) ) {
    	echo $key_1_value;
    } ?>

    Just change the name of the key "key_1" to that of the custom field you would like to display. More info here:

    http://codex.wordpress.org/Function_Reference/get_post_meta

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.