вы можете использовать пользовательский тип записи в WP
, пожалуйста, перейдите по этой ссылке https://www.wpbeginner.com/wp-tutorials/how-to-create-custom-post-types-in-wordpress/
попробуйте ниже код
// Our custom post type function
function create_posttype() {
register_post_type( 'Members',
// CPT Options
array(
'labels' => array(
'name' => __( 'Members' ),
'singular_name' => __( 'Members' )
),
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'Members'),
)
);
}
// Hooking up our function to theme setup
add_action( 'init', 'create_posttype' );
это сделает меню в WP adminс именем «Участники».
там вы можете добавить нужные данные.
для получения,
$args = array( 'post_type' => 'Members', 'posts_per_page' => 10 );
$the_query = new WP_Query( $args );
// loop the data
while (have_posts()) : the_post();
the_permalink(); // for the link to the post
the_title(); // to display the title
get_the_excerpt(); // details you entered
endwhile;