Skip to content
This repository
Browse code

using locate_template instead of get_template_part

the fact that get_template_part can traverse directories is actually to be considered a bug so we should be using locate template instead.
  • Loading branch information...
commit 3854f85181cf0dafae7908b5627733718327f2c3 1 parent 716b214
Curtis McHale authored

Showing 3 changed files with 3 additions and 6 deletions. Show diff stats Hide diff stats

  1. +1 2  archive.php
  2. +1 2  index.php
  3. +1 2  single.php
3  archive.php
@@ -45,8 +45,7 @@
45 45 <?php endwhile; ?>
46 46
47 47 <!-- includes next previous links or post level nav -->
48   - <!-- TODO locate_template -->
49   - <?php get_template_part( 'assets/includes/post-navigation' ); ?>
  48 + <?php locate_template( array( 'assets/includes/post-navigation.php' ), true ); ?>
50 49
51 50 <?php else : ?>
52 51
3  index.php
@@ -26,8 +26,7 @@
26 26 <?php endwhile; ?>
27 27
28 28 <!-- includes next previous links or post level nav -->
29   - <!-- TODO locate_template -->
30   - <?php get_template_part( 'assets/includes/post-navigation' ); ?>
  29 + <?php locate_template( array( 'assets/includes/post-navigation.php' ), true ); ?>
31 30
32 31 <?php else : ?>
33 32
3  single.php
@@ -22,8 +22,7 @@
22 22 <?php get_template_part( 'loop', 'blog' ); ?>
23 23
24 24 <!-- includes next previous links or post level nav -->
25   - <!-- TODO locate_template -->
26   - <?php get_template_part( 'assets/includes/post-navigation' ); ?>
  25 + <?php locate_template( array( 'assets/includes/post-navigation.php' ), true ); ?>
27 26
28 27 <?php endwhile; else: ?>
29 28

0 comments on commit 3854f85

Please sign in to comment.
Something went wrong with that request. Please try again.