How to create single page of advance custom field in wordpress?

I am create post with advance custom field (movie-page.php) I want to create single page(single-movie.php) each post of movie-page.php when I am click on each post it link to full details but I can not do it. Help me please!!!. thanks you.

And here is my code movie-page.php

<?php
/*
 *  Template Name: Page - Movie Page
 */
?>
<?php get_header(); ?>
<?php 

$posts = get_posts(array(
    'posts_per_page'    => -1,
    'post_type'         => 'movie'
));

if( $posts ): ?>

    <ul>

    <?php foreach( $posts as $post ): 

        setup_postdata( $post )

        ?>
<div class="jol">
            <a href="<?php get_permalink($post->ID); ?>"><?php the_title($post->ID); ?></a>
            <?php get_post_field('descriptionii',$post->ID ); ?>
             <?php the_content() ?>
            <?php the_field("descriptionii") ?>
</div>
        <?php endforeach; ?>

    </ul>

    <?php wp_reset_postdata(); ?>

<?php endif; ?>
<?php get_footer(); ?>

Answers


 <?php
/*
 *  Template Name: Page - Movie Page
 */
?>
<?php get_header(); ?>
<?php $args = array(
    'posts_per_page'   => -1,
    'post_type'        => 'movie',
    'post_status'      => 'publish',
);
$posts_array = get_posts($args);

foreach ($posts_array as $key => $value) {
    echo "<a href=".$value->guid.">".$value->post_title."</a></br>";
    echo $value->post_content;
}
?>
<?php get_footer();

Need Your Help

how to bind HTML5 and SpringMVC 4 using Thymeleaf?

java html5 spring jsp thymeleaf

OK, I managed to get my application using Thymeleaf and now I need to reconstruct all the JSP pages into HTML5. First and foremost, I need to be able to login into the application using the usernam...

Orgmode can't authenticate to WebDAV for mobile-org "push"

linux webdav org-mode

I'm struggling with WebDAV configuration for orgmode MobileOrg sync. (Orgmode documentation suggests using Dropbox for sync, but the last time I checked, that wasn't available in mainland China, wh...