• After upgrading to 3.5.2 I am having a problem where the header and footer load on the page but my custom page templates are no longer working, they worked perfectly pre-upgrade so I am fairly certain this has to do with the upgrade to 3.5.2, has anyone else experienced this issue?

    Here is the template code in case you can spot anything:

    <?php
    /*
    Template Name : Grape Recipe Page Template
    */
    ?>
    <?php get_header(); ?>
    <article class="recipes">
        <header><h1><?php the_title(); ?></h1></header>
        <div id="recipe-navigation">
        	<h4>Show me recipes for:</h4>
    		<?php get_sidebar('recipe-menu'); ?>
        </div>
        <section class="recipe-wrap">
    		<?php
            // Query Recipes
    		$temp = $wp_query;
    		$wp_query = null;
    		$wp_query = new WP_Query();
    		$wp_query->query('showposts=5&post_type=fp_recipes&orderby=menu_order&order=ASC&recipes=Grape Recipes'.'&paged='.$paged);
    		if($wp_query->have_posts()) : while ($wp_query->have_posts()) : $wp_query->the_post();
            ?>
            <div class="recipe group">
            	<div class="recipe-thumb float-left"><?php if(has_post_thumbnail()){the_post_thumbnail('recipe-thumb');} ?></div>
                <div class="recipe-copy float-right">
                	<h3><?php the_title(); ?></h3>
                	<ul class="recipe-details">
                    	<li><?php if(get_field('serves')){echo 'Serves: '.get_field('serves');} ?>  </li>
                        <li><?php if(get_field('cooking_time')){echo 'Cooking Time: '.get_field('cooking_time');} ?>  </li>
                    </ul>
                    <h4 class="ingredients">Ingredients</h4>
    				<?php the_content(); ?>
                    <h4 class="directions">Directions</h4>
                    <?php if(get_field('cooking_directions')){echo get_field('cooking_directions');} ?>
                </div>
            </div>
            <?php
    		endwhile;
    		if(function_exists('wp_paginate')){wp_paginate();}
    		$wp_query = null;
    		$wp_query = $temp;  // Reset
    		else:
    		?>
            <div class="recipe group no-posts"><p>Sorry, no recipes are available at this time.</p></div>
    		<?php endif; ?>
        </section>
    </article>
    <?php get_footer(); ?>
  • The topic ‘WordPress Upgrade Causes Empty Page Template’ is closed to new replies.