WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] modified author meta?

[Resolved] modified author meta?

  • Is there a way to get modified author meta (similar to the_author_meta())? I have searched both api and forums, but nothing has come up.

    I need to do something like this:

    Post modified by <?php the_modified_author_meta('first_name'); ?>.

    Thank you for any help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Not sure what you are trying to do. Can you just create your own function which in turn calls the_author_meta() and modifies the results before returning them?

    No, the_author and the_author_meta refer to the user who originally published a post. the_modified_author refers to the user who most recently modified a post.

    How do you propose to modify the results of the_author_meta (which btw returns null, perhaps you were thinking of get_the_author_meta())?

    Thank you for replying.

    Never mind, I sort of figured it out by myself:

    function the_modified_author_meta($field) {
    	global $post;
    	if ($id = get_post_meta($post->ID, '_edit_last', true)) {
    		the_author_meta($field, $id);
    	}
    }

    Please excuse my ignorance – I was not aware of that.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] modified author meta?’ is closed to new replies.