Unfortunately I don’t have time to write the code, but here’s what you need to do essentially:
- Get the current author ID
- Get the country-field for that user ID. Save this in a
$variable. - In the loop, before the HTML output code, get the author ID and then get the country-field for that user ID. Store this in $variable2.
- Then, wrap the HTML output code in an if-statement where you check if $variable === $variable2.
That is essentially how you do it. If no one else has later on, I will write some code for you, but right now I don’t have time.
Related Posts:
- How to pass external variables to the wp_new_user_notification_email filter?
- Function to allow “Anyone can register”?
- Changing starting number of User ID
- User registration add user ID?
- How to change the default registration email ? (plugin and/or non-plugin)
- How to update the delete user confirmation form?
- Integrating WordPress to my website, while keeping my own authentication system
- Modify custom Users Manage page
- How to Save Different Usermeta Fields According to User Role?
- generate unique number when registering a user
- Adding extra info via GET while registeration in wordpress
- Authenticating to WordPress, using my own authentication two-factor system
- Many users with strange names register, but don’t leave comments. Should I be afraid?
- Set user loggin status?
- How can I add data to a custom column in the Users section of the wordpress backend?
- Unique User Account Number + Displayed Via Shortcode
- Last time a user logged in
- Updating Custom WordPress User Meta Field via REST API
- How can I allow access to multiple users, using the same login, at the same time?
- Creating user relationships
- Add custom user profile field to default WordPress MultiSite registration form
- What’s wrong with Customizing new user notification email by add_filter?
- Make custom user table column filterable
- Add ‘Creator’ User Meta when adding user
- Follow me for WordPress blogs (multi-authors)
- I want to submit multiple users if checkbox is checked
- Change the Labels of Users to Customers in Admin
- user_profile_update_errors hook not executing
- How Can I Move Data From Form 1 To Form 2
- Auto login from custom registration form
- Diffrent User registration form for doctor and patient
- User can not login
- Allow guests to use WP Customizer but disable save button
- Users can only view their content from the front end
- List top 5 authors with most posts
- Multi-site User Sessions
- Add Field to WordPress Register Form
- Problem with custom user meta field
- Customizing Users in Admin Area
- how to make a custom field readonly or disabled by user role?
- How to make wordpress use a non-wordpress users table?
- Custom login and registration forms
- Create Unique ID for user
- Custom Register Link on Backend Form
- Personalized Gallery what are my options?
- how or where wordress collect unlogged user session
- Hook before user is created and make some custom validation
- How to change the login page without a plugin and not only customizing logo and text around the form?
- No plugin populate user information in to form
- Invitation link to a site in multisite network does not work?
- WP_User_Query Search Multiple Keywords from a Multi-Select Field?
- Highlight specific user with custom field value
- Change the functionality of wordpress users module in admin
- Custom user fields validation on registration
- Custom options – register, defaults and delete empty fields (Settings API)
- add unique code required to register
- Custom search by several options send on form not works
- How to create functions that affect only a specific user
- Create users via PHP
- Use wp_login_form function to login with a custom user table?
- How to get value from wp_usermeta table in database?
- Is it possible assign a secondary existing role to already existing one?
- Redirect all pages to the custom login page except for the registration page
- User Query Multiple Orderby Clause
- Some data of one custom user profile is erased when I update another custom user profile
- Customizing the Subject Field in WordPress’ Notification Emails?
- How to move wp-content (or uploads) outside of the WordPress directory
- How to get user ID during registration and add it to a custom table
- Redirect to requested page after (custom) login
- Page load requires a trailing “/” [closed]
- dynamic external javascript generated using php
- Show Custom Taxonomy Slug(s)?
- How to retrieve the value stored in a multi-dimensional array and SUM the entries?
- Integrate WordPress into existing website
- How can I use get_bloginfo(‘admin_email’) in a custom PHP file?
- Automatically Update Woocommerce Prices [closed]
- Multiple Tinymce/wp_editor in WordPress >4.8
- CPT Loop with ACF and passing ID between Loops
- Allow the comment author to delete their own comments
- WordPress registration without wp-login.php and wp-admin folder, is it possible?
- get author in blog posts?
- Display specific Taxonomy Term from Custom Post Type
- How to set custom avatar for users?
- Widget title markup in register_sidebar
- Garbage in uploads folder
- What is theme-editor.tmp?
- How to customize shipping region/states on WooCommerce
- Remove welcome panel from contact form 7 page [closed]
- Do I need to instantiate the XMLRPC class or any class in another class to access its methods?
- RSS feed showing deleted post
- Custom page template, not acting as page
- Customizing woocommerce product page
- Customizer options limited to specific user roles?
- Woocommerce custom “My Account” Tab – Add Save button
- WordPress Using Zip code customer shop find without woocommerce plugin
- Embedded Options in a Custom Metabox
- New User ID not working in custom function with user_register hook
- Turn Autocomplete on
- WordPress password as plain text in email
- Add a custom field for sorting the products in a specific category WOOCOMMERCE – Second try