Template for Video-Playlist ( as custom post & Custom taxonomy)
-
Hey Guys,
I would like to add videos from my Youtube channel to my blog.
Therefore, I made an custom Post Type “Videos” and a Taxonomy called “playlist” with the help of “Types”.
Now I want to customize the site of the single taxonomies (taxonomy-playlist.php).
I would like to have the current Video displayed on the left side and on the right side (In the Sidebar) a list with all the content(Videos) in my playlist, like onhttps://gopro.com/channel/
First I tried it with an html list, but that does not really work.
Does anyone have better ideas how to realize this?Here is my current code:
<?php get_header(); ?> <?php do_action( 'colormag_before_body_content' ); ?> <div id="primary"> <div id="content" class="clearfix"> <?php while ( have_posts() ) : the_post(); ?> <?php if (get_the_id() == $_GET['Videos']) { the_title(); echo types_render_field( "video", array('raw' => false) ); } ?> <?php endwhile; ?> </div><!-- #content --> </div><!-- #primary --> <div id="secondary"> <div id="sidebar" class="clearfix"> <?php rewind_posts(); ?> <form action="<?php echo $_SERVER['PHP_SELF'] ?>"> <select name="Videos" size="8" onchange="this.form.submit()"> <?php if ( have_posts() ) : the_post(); ?> <option selected value="<?php get_the_id() ?>"> <?php the_post_thumbnail('playlist-video-thumbnail') ?> <?php the_title() ?></option> <?php endif; ?> <?php while ( have_posts() ) : the_post(); ?> <option value="<?php get_the_id() ?>"> <?php the_post_thumbnail('playlist-video-thumbnail') ?> <?php the_title() ?></option> <?php endwhile; ?> </select> </form> </div> </div> <?php do_action( 'colormag_after_body_content' ); ?> <?php get_footer(); ?>
I know, this can′t work. But I hope that you understand what I want to do and can help me.
- The topic ‘Template for Video-Playlist ( as custom post & Custom taxonomy)’ is closed to new replies.