You just need to put a query in your template. As an example, I use less conditions.
You may add what is necessary later.
// prepare arguments
$args = array(
'post_type' => 'members',
'orderby' => 'name',
'order' => 'ASC',
'post_status' => 'publish',
);
// create a query based on arguments
$query = new WP_Query($args);
while ($query->have_posts()):
$query->the_post();
// output here
// WP builtin: eg. echo get_the_title();
// you can add html table here
// ACF builtin: echo acf_get_metadata( get_the_ID(), 'meta_name' )
endwhile;
wp_reset_query();
In between the while loop
, you can create html table. I suppose you know how to create html and add php code so I just give you the essential idea.
For query, you may refer to WP_Query class
Related Posts:
- Meta Query “IN” doesn’t work with ACF checkbox filter
- List events by month
- Clean URL permalink for custom post type
- Custom post type loops with different page templates
- Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page
- Show ACF field from custom taxonomy and display on the single template
- Change message given when deleting post from custom post type
- is_page_template not working as expected
- Link users to a custom post type
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- Using wordpress template tags within an array
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- get_posts of Custom Post Type AND Custom Taxonomy
- WP_Query to select custom post type with Advanced Custom Fields (ACF) date
- How to update post meta on uploaded image from a custom form?
- Displaying custom field according to date
- Create short URL with auto 301 redirect
- Query entries from custom post type in an ACF flexible content field
- How to use single.php for creating, reading and editing Custom Posts with ACF
- meta query not retrieving posts
- Template code to split a post and print a custom field?
- Fetch data from two custom post types and create multidimensional array for output to html table
- Custom front-end form for adding post – Category problem
- count & sum the value of custom field of the author post in dynamic posts
- Grouping custom wordpress post types by acf value
- WordPress – display relationship between blog posts and custom posts
- Custom sorting in post columns by ACF Pro Select Field
- Accessing download link from the loop with WP Download Manager Pro
- Custom post type option page template
- CPT: execute code after load if parameter is set
- ACF Post Content Not Being Searched
- Values show up in custom home page but not in custom post pages
- Display related post content and custom field content
- Group/list/sort custom post type posts by date in tabs from acf datepicker field
- How to make a custom search template for custom taxonomy?
- Can’t pick up a field created with Advanced Custom Fields
- Why isn’t my custom post type using the corresponding custom post template?
- Custom post tag images not displaying with ACF
- Get month and day from a Date Picker custom field
- using ACF datepicker to filter posts on a page
- Custom Post-type not returning the right child_of
- PHP Button Custom link [closed]
- Getting ACF relationship field information
- using a template for more then 1 page
- How to I add count of custom posts listed in a post as a prefix to its title
- Custom post type is_singular condtional not working when managing sidebar display
- How to create an array for a CPT post ID to use in an IF/WHILE statement
- WP_Query is printing out only one post when posts_per_page is set to multiple
- WP Query to displaying date and posts for that date?
- GravityForm: Populate Dropdown with custom post type [closed]
- Return array of categories to php function for current post
- Trying to edit the single page from a Custom Post
- Create a random unique 6 digit number as custom field for custom post type
- How to output wordpress custom tags separated by comma?
- Remove duplicated values from a loop
- Loading all files within a directory
- Blog page showing same content as homepage
- Using several custom fields as custom post title
- Custom Post Type without an archive page
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- Get rewrite slug of custom post type in template
- Show Different Header on a Specific Post ID
- “add_post_type_support” with Custom Post Type & ACF
- Get Post Primary Category
- Custom Post type with ACF in REST API, how do I get those values?
- Weird problem happening with custom taxonmy when creating/updating posts
- ACF simple text field value not showing
- How to show the archive / post type description on Single templates
- A good strategy to print custom posts (offer) that are checked inside the metabox of a post?
- Post Object Filter by Custom Field, not title (ACF)
- Custom Post Types not showing, custom WP_Query
- Admin notice not displaying
- Can’t get order_by meta_value_num to work properly
- Create custom post type on successful woocommerce order [closed]
- Rewrite WordPress URL to show CPT meta field data
- Create 3 Level Relations with ACF and WordPress
- Custom Post type and Custom Field WP_Query
- Plugin templates in which directory
- Display multiple custom post types and sort them chronological by one of their fields
- Adding custom tables to WordPress
- Create Template for Custom Post Type same like for Page
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Very Slow Page – How to Optimize # of Queries?
- Dynamic page outside WordPress
- Getting the URL of the parent page
- Custom query to filter posts that have current post as a taxonomy [closed]
- Multiple ACF Repeaters within a Custom Post Type
- Include custom post type single template, but respect theme override of template if it exists
- How to change post featured image using a custom field of category?
- Custom post type permalink returns bad url
- Custom template page with custom archives listing by user
- Custom post type not using custom template
- Return the thumbnail meta data for getter and setter
- Custom Post Type template stored in plugin folder not showing in post attributes dropdown
- How to display selected taxonomies by their parent
- Validate custom fields before save using WordPress Rest API
- Custom Field Order by Last Name and First Name
- Pagination for custom php code
- What’s the difference between same wp functions get_posts(); functions in different form?
- Set up Custom-Post-Type Author Archive