Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jeff Starr

    (@specialk)

    If enabled on the form, the author/name field is added as a Custom Field to the submitted post. You can get the name Custom Field and display it using the following code:

    <?php // display submitted author name
    $usp_author = get_post_meta(get_the_ID(), 'user_submit_name', true);
    echo $usp_author; ?>

    You can add that to your theme template and it will display the submitted name.

    Thread Starter dbybanez

    (@dbybanez)

    It worked perfectly!

    I’ve added a condition so that I will post the submitted author name or the wordpress author:

    if($this_post->is_submission == true)

    Thank you!

    Plugin Author Jeff Starr

    (@specialk)

    Awesome!

    Also note that USP provides a built-in function to check if it’s a submitted post:

    usp_is_public_submission()

    More info in the plugin documentation.

    ?You can add that to your theme template and it will display the submitted name.?

    I’m a beginner in all this. Where do I have to add the code exactly ?

    What I want to do: I would like to add a search tool by user submitted name.

    Possible ?

    Thanks

    • This reply was modified 7 years, 6 months ago by jocedage.
    Plugin Author Jeff Starr

    (@specialk)

    You would use that tag wherever it is required, most likely in some conditional logic within the WordPress Loop. I’m sure that you or your developer could build a search tool, but it’s not something that is included with the plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to display Submitter Name in the loop?’ is closed to new replies.