I need to display additional author profile based on Custom Field Value.

I am using native wordpress custom filed declaration. so for my custom field name is

$coauthor = get_post_meta( get_the_ID(), 'coauthor', true);

and in page I had given Bhargav Joshi to coauthor custom fields, so i need to display Complete author profile with Bhargav Joshi.

How can i show this? It doesn't matter when i want to show inside loop or outside loop.

Thank you.

1 Answer 1


You have to use meta query.

$query = new WP_Query( array( 'meta_key' => 'coauthor' ) );

Later, you can loop through this query.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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