Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. function create_post_type()
  2. {
  3. register_post_type('episode',
  4. array(
  5. 'labels' => array(
  6. 'name' => __('Episodi'),
  7. 'singular_name' => __('Episodio')
  8. ),
  9. 'public' => true,
  10. 'has_archive' => true,
  11. 'taxonomies' => array('category')
  12. )
  13. );
  14. }
  15.  
  16. <?php get_template_part('templates/page', 'header'); ?>
  17. <?php echo single_cat_title(); ?>
  18. <?php if (!have_posts()) : ?>
  19. <div class="alert alert-warning">
  20. <?php _e('Sorry, no results were found.', 'sage'); ?>
  21. </div>
  22. <?php endif; ?>
  23.  
  24. <?php while (have_posts()) : the_post(); ?>
  25. <?php get_template_part('templates/content', get_post_type() != 'post' ? get_post_type() : get_post_format()); ?>
  26. <?php endwhile; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement