Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
- <?php wpb_set_post_views($post->ID);
- $tags = get_the_tags();
- $term_ids=array();
- if($tags){
- foreach($tags as $tag) {
- array_push($term_ids,$tag->term_id);
- }
- }
- $photos_id = get_cat_ID( 'photos' );
- $tv_id = get_cat_ID( 'tv-posts' );
- $music_videos_id = get_cat_ID( 'music-videos' );
- if ( post_is_in_descendant_category($photos_id) || in_category('photos', $post->ID) ) {
- include(locate_template('partials/single_photo.php'));
- }
- elseif(post_is_in_descendant_category($tv_id) || in_category('tv-posts', $post->ID)){
- include(locate_template('partials/single_tv.php'));
- }
- elseif(in_category('music-videos', $post->ID) || post_is_in_descendant_category($music_videos_id)){
- include(locate_template('partials/single_music-video.php'));
- }
- else {
- include(locate_template('partials/single_post.php'));
- }
- ?>
- <?php endwhile; endif; ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement