In the template you just need to check if the current user’s logged in with is_user_logged_in()
. Then output whatever HTML/PHP (including ACF functions) that you only want to show logged in users:
<?php if ( is_user_logged_in() ) : ?>
<!-- Output for only logged in users here. -->
<?php endif; ?>
Related Posts:
- Is there a way to set default custom fields when creating a post?
- Underscores in custom fields
- Add custom field to the archive page?
- Show only posts which can be commented OR have custom meta field
- Need small coding with Custom Fields Search
- Adding Custom Field to Taxonomy Input :Panel
- How do I make a custom field choose an image?
- get_post_meta() unserialize issue – returns boolean(false)
- How can I remove fields in the attachment editor?
- Unable to get Preview of Uploaded image within a Custom Meta box
- Edit Custom Database Tables in WordPress
- How to store the value of a custom field dropdown select for post referencing?
- Custom bulk action for media gallery items
- Change content before writing to database
- post meta data clearing on autosave
- WordPress Search Custom Meta Field Only
- Query Problem – Show posts within category ‘x’ that have a custom field between ‘y’ and ‘z’
- Localized Date Format for Custom Field
- Add description text under input field for new profile fields
- Check if the value of a field has changed on save_post
- Which is best in the following scenario : post_meta vs custom table vs parent/child posts
- Saving custom image meta fields
- Echo values from custom field outside loop php
- How to add content at the end of posts?
- Get all posts that do not have a specific custom field without using a subquery
- Transfer self made functions.php custom fields to Advanced Custom Fields [closed]
- Complex WP_User_Query call fails on production server
- Query post order by post and desc not working
- If category then echo a custom fields
- How to query posts with certain custom meta data, and output Post data
- Custom Fields Not in Search Results
- wordpress custom fields multiple data
- How do I define post titles as images using Custom Fields?
- How to show Small Box Inside Content Area, which holds (text, images, links)?
- Sort custom field by post
- How to order posts by one custom field and filter them by another one?
- How to create a gallery custom field for WordPress post?
- Get an advanced custom field after post publish
- Why the pagination for a query modified by pre_get_posts doesn’t mind the number & order of posts sorted & selected based on a custom date time field
- How to display image inside container of custom made widget
- Trying to update_post_meta function
- How do i add custom fields to my themes template file?
- Custom Field to a Role?
- List users by sum of all their posts’ custom field values
- Duplicate (or more) custom fields on many posts. Is there an easy way to clean them up?
- Pull custom fields from custom posts within a loop
- Ordering posts by custom field named “date” in backend
- How to pass page as an argument like post in WordPress?
- Sort WP_Query with numeric custom field
- How to display custom fields from a plugin
- Adding “meta” info to WP site PHP function?
- WordPress Media Uploader custom Javascript not working
- Custom fields issue [closed]
- Select custom posts by meta_value and sort by a different meta value
- List custom queried terms in the edit-tags.php?taxonomy page
- Pass PHP through redirect and custom fields
- How can I create a profile field group that the user can’t see?
- Custom field as featured image caption
- Update custom field values on edit address page woocommerce
- Is there a (sane) way to get all custom fields for a post, which do not have a leading underscore?
- Custom field image to Featured Image
- Show array of meta_value in Edit Post Coloum
- custom filed from post in the side bar
- Working with multiple values and metaboxes
- Unable to select image with custom field
- Rewrite comment form post ID on submit
- Add a custom field to my custom post type and then get posts which are before the given date in the custom field
- Move the metaboxes to the very top of post editor
- Custom User Dashboard
- WordPress Rest API custom field not updating till i manually update the post
- search based on custom field
- Why isn’t update_post_meta saving?
- Custom Fields not working properly
- Custom meta POST request fired twice when updating a post in Gutenberg
- add meta box considers the selected option as post parent
- Custom fields multiple commas separated values
- How do I display a custom field in an existing form on the front end?
- Add custom field information to source meta data
- How to save array option as text and not integer?
- Delete custom meta
- Extend WP_User_Query or WP_User to return all custom fields?
- Quicktag button to automatically add a custom field to a post
- Display custom fields only if it has a value
- WordPress taxonomy child image
- Create custom fields/meta data gender+country – radiobuttons and dropdown on register screen for these fields
- Add nofollow to custom field link and make domain exceptions?
- wordpress simple post multi rating with post_meta and user_meta
- Custom fields are not displaying in page with multiple loops
- Add class from custom field into widget class
- Download stuff after filling fields?
- Get multiple posts with some custom fields efficient
- Adding custom field to Lightbox in header only pulls current page data, not Lightbox item data
- Meta boxes not displayed, data isn’t being saved
- Custom fields / meta box output
- Custom registration form and custom field
- Get single image from custom fields made with WCK custom fields creator
- How to add google map to custom field
- How can i put a custom field inside this php
- Truncating characters in Advanced Custom Fields works some places but not others?
- How to add an ACF only for parent term?