<?php
/*
Template Name: Actor Detail
*/
?>

<?php get_header(); ?>

<!-- Row for main content area -->
	<div class="small-12 large-8 columns" id="content" role="main">

<?php /* Initiate the Pods Object */

    // get the current slug
  	/* $slug = pods_v( 'last', 'url' ); */

		global $post;
  	// get pods object
  	$mypod = pods( $post->post_type, $post->ID );
    $actor = $mypod->id();
    $title = $mypod->display('title');
  	$permalink = $mypod->display('permalink');
    $videos = $mypod->field('related_videos');

?>
		<article>
			<header>
				<h1 class="entry-title">
          <a href="<?php echo $permalink; ?>"><?php echo $title; ?></a>
        </h1>
			</header>
			<div class="entry-content">
<?php /* Output the Movies */
      if (! empty( $videos )) { ?>

        <h3>Movies:</h3>
        <ul id="movie-list">
      <?php
        foreach ( $videos as $video ) {
          $id = $video[ 'ID' ];
          echo '<li><a href="' .get_permalink( $id ). '">' .get_the_title( $id ). '</a></li>';
        }
      }
?>

			</div>
			<footer>
			</footer>
		</article>


		<?php comments_template(); ?>

	</div>
	<?php get_sidebar(); ?>

<?php get_footer(); ?>

 

Questions