• Resolved cmtusa

    (@cmtusa)


    Great plugin. Quick question. Is there a way to make the user’s name attach to the post. I’m using a restrict page plugin so that users have to login to submit the post. I want the display name to be associated with the post. As of now, the username attaches to the post. Is there a way to change this?

    Thanks!

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

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

    (@specialk)

    Sure, here is an example that could be placed in the Loop:

    <?php $usp_author = get_post_meta(get_the_ID(), 'user_submit_name', true);
    if (!empty($usp_author)) {
    	echo $usp_author;
    } else {
    	the_author_posts_link(); // regular post author
    } ?>
Viewing 1 replies (of 1 total)
  • The topic ‘username associated with post’ is closed to new replies.