I'm trying to format my single post page template that has custom types. I'm using the_content() which displays the post contents altogether, but how can I call individual content fields so that I can arrange them in the template?
functions.php
function stories_init() {
$args = array(
'label' => 'Stories',
'public' => true,
'show_ui' => true,
'capability_type' => 'post',
'hierarchical' => false,
'rewrite' => array('slug' => 'stories'),
'query_var' => true,
'menu_icon' => 'dashicons-video-alt',
'supports' => array(
'title',
'editor',
'custom-fields',
'thumbnail',)
);
register_post_type( 'stories', $args );
}
single-post.html
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
<?php endwhile; ?>