Original author name does get updated
-
Hi,
The co-author does not update the author’s name when we update it from the original field where WordPress stores author name by default!
For example, I am an editor and I created a topic for author and save that post post. By default, my username will be saved as the author. When we change the author to the writer of the post, it updates from everywhere but it is not changed from post meta.
Let’s assume:
My username: ABC and I saved a post Later I decided to remove myself and add a different XYZ author using co-author. But when we see in the RSS feed, we get the ABC as the author rather than XYZ
When we code:$post_id = 413139; // replace this with the post ID you want to retrieve the author’s name for
$author_id = get_post_field(‘post_author’, $post_id); // gett the author’s user ID for the post
$author_name = get_the_author_meta(‘display_name’, $author_id); // get the author’s display nameecho ‘Author Name: ‘ . $author_name;
Output: Author Name: ABC
It should be XYZ!
- The topic ‘Original author name does get updated’ is closed to new replies.