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
- Encrypt User last name in wordpress for security reasons
- Get All Results From Other Users That Share The Same Custom User Meta As Current User
- How to block specific user id in custom login form?
- Can we set a redirection with dynamic content in url?
- How to make conditional statement in WpBakery (formarly Visual Composer)
- How do I make mysite.com/comingsoon WordPress to become my main website’s WordPress?
- Simple custom attributes on posts
- Can we hide a certain user in WP?
- Multiple header style under meta box
- Use a custom page with dynamic content as a user profile page
- Easily adding multiple existing users to a multisite site
- website is not loading home page (moving from one server to another server)
- Best practice to generate token for email action
- Style WooCommerce Product Search Widget
- Display all subterms of a custom taxonomy filtered by parent terms
- how to change the url rediction of the woocommerce login page of the flatsome theme for my own in wordpress?
- My list of terms of custom taxonomy displays 7 times
- why won’t my custom css load with the enqueue method or any other method?
- Can’t upload format files on media library
- Delete a column in edit.php generated with a plugin
- Customizer options limited to specific user roles?
- Product page not found if product data is set Appointment Service
- Block direct access to thank you pages
- How do I add a dropdown menu to a form?
- What is my error trying to create a new table in the database?
- I want to embed mystream video in my wordpress site
- Current menu item highlights wrong
- Adding a custom field to a slug
- Measure time in ONLY HOUR format
- Add admin page for specific post status (for example)
- Query Product categories what have a custom field
- Get /users/me details from WordPress backend
- mailchimp integration on a custom footer
- Can’t Customize WordPress Page
- ACF unable to use user field