0

I have added two custom functions in my theme to retrieve Author email and Author ID From a specific post where contact form 7 Is displayed. But My Author ID Function is not working and only author email is being retrieved. So please help me find the fix. The code is as given below.

function property_get_author_id($atts){ $value = ''; if(get_the_author_meta( 'user_id' )) { $value = get_the_author_meta( 'user_id' ); } return $value; } add_shortcode('PROPERTY_AUTHOR_ID', 'property_get_author_id');

Your Answer

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

Browse other questions tagged or ask your own question.