From: Laury GvR Date: Thu, 15 Nov 2018 15:07:26 +0000 (-0500) Subject: No longer need to list all templates used X-Git-Tag: v1.0.33^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=983f6b742a2281e318d8c26ccdabb5c1ab64437a;p=WP-Themes%2Fharborcountry.git No longer need to list all templates used --- diff --git a/lib/misc.php b/lib/misc.php index a2776ab..26d63d2 100644 --- a/lib/misc.php +++ b/lib/misc.php @@ -78,65 +78,65 @@ function mytheme_search_loop() {

Templates Used

"; - list_templates_by_type( 'page' ); - list_templates_by_type( 'post' ); - //list_templates_by_type( 'custom-post-type' ); -} +// function list_templates_used( ) { +// global $post; +// echo "

Templates Used

"; +// list_templates_by_type( 'page' ); +// list_templates_by_type( 'post' ); +// //list_templates_by_type( 'custom-post-type' ); +// } -function list_templates_by_type( $type = 'page' ) { +// function list_templates_by_type( $type = 'page' ) { - $args = array( 'post_type' => $type, 'posts_per_page' => -1 ); - $posts = get_posts( $args ); - $count = 0; +// $args = array( 'post_type' => $type, 'posts_per_page' => -1 ); +// $posts = get_posts( $args ); +// $count = 0; - $output = ''; - $output .= '

\''. $type .'\' List

'; +// $output = ''; +// $output .= '

\''. $type .'\' List

'; - foreach ($posts as $post) { - setup_postdata( $post ); - if ( get_page_template_slug( $post->ID ) ) { - if ( $count == 0 ) { - $output .= ' Every '. $type .' not listed below has template "Default".

'; - $output .= ' '; - $output .= ' '; - } - $count++; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - } +// foreach ($posts as $post) { +// setup_postdata( $post ); +// if ( get_page_template_slug( $post->ID ) ) { +// if ( $count == 0 ) { +// $output .= ' Every '. $type .' not listed below has template "Default".

'; +// $output .= '
IDNameSlugTemplate
' . $post->ID . '' . $post->post_title . '' . $post->post_name . '' . get_page_template_slug( $post->ID ) . '
'; +// $output .= ' '; +// } +// $count++; +// $output .= ''; +// $output .= ''; +// $output .= ''; +// $output .= ''; +// $output .= ''; +// $output .= ''; +// } - } - $output .= ''; - $output .= '
IDNameSlugTemplate
' . $post->ID . '' . $post->post_title . '' . $post->post_name . '' . get_page_template_slug( $post->ID ) . '
'; +// } +// $output .= ''; +// $output .= ''; - if ( $count == 0 ) { - $output .= ' Either there are no posts with type "' . $type . '", or none of them have custom templates set (and have the Default template). '; - } +// if ( $count == 0 ) { +// $output .= ' Either there are no posts with type "' . $type . '", or none of them have custom templates set (and have the Default template). '; +// } - wp_reset_postdata(); - echo $output; -} +// wp_reset_postdata(); +// echo $output; +// } add_action('thematic_searchloop', 'mytheme_search_loop'); // End of the Contextual/Highlight Search functions \ No newline at end of file