I need a loop that pulls in all posts that were authored by the logged-in user.

I have to then create a link to the post with this in the querystring: ?_ninja_forms_action=edit.

$posts = get_posts(
        'post_author' => get_current_user_id(),
        'post_status' => 'any',
        'post_type'   => 'any',

foreach ( $posts as $post )
    printf( '<a href="%s">%s</a><br />',
            add_query_arg( '_ninja_forms_action', 'edit', get_permalink( $post ) )
        get_the_title( $post )
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.