• Resolved antoineleeroy

    (@antoineleeroy)


    Hi, Thanks for your amazing plugin.

    When I try to export author field, the plugin export author_id instead of author name.
    Is it possible to export the author name ?

    Thanks !

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @antoineleeroy

    Yes, you can export the author name by using a custom PHP function. When you add the “Author” field to the export template, click the field to edit it and select “Export the value returned by a PHP function”. Here’s the code:

    function my_get_author( $user_id ) {
    	$user = get_user_by( 'id', $user_id );
    	return $user->display_name;
    }

    Here’s what the field set up will look like: see screenshot.

    Thread Starter antoineleeroy

    (@antoineleeroy)

    Thank you so much !

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Export Authors’ is closed to new replies.