Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #603369

    I created a special template for my website. Since updating my theme, I noticed that all pages using this special template are not displaying properly. The content is missing and the sidebar is now showing in the content area.

    I modified the page.php for my special template. The header and the footer are displaying just fine but it seems it’s the main section that is the problem. It’s missing and, somehow the sidebar is moving over the main content area. Here is the code I am using for my template:

    
    <?php 
    	/*
    	Template Name: Jeff_Past
    	*/
    
    	global $avia_config, $more;
    
    	/*
    	 * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
    	 */	
    	 get_header('past');
     		
    	?>		
    		<!-- ####### MAIN CONTAINER ####### -->
    		<div id='main'>
    		
    			<div class='template-page'>
    
    				<div class='content <?php echo $avia_config['content_class']; ?> units'>
    
    				<?php
    				/* Run the loop to output the posts.
    				* If you want to overload this in a child theme then include a file
    				* called loop-page.php and that will be used instead.
    				*/
    				$avia_config['size'] = 'page-past';
    				get_template_part( 'includes/loop', 'page-past' );
    				?>
    				
    				
    				<!--end content-->
    				</div>
    				
    				
    				
    			</div><!--end template-->
    
    	</div>
    	<!-- ####### END MAIN CONTAINER ####### -->
    

    The rest is working just fine.

    • This topic was modified 3 years, 5 months ago by  outtacontext.
    #603381

    I found the problem. It was here:

    
    $avia_config['size'] = 'page-past';
    				get_template_part( 'includes/loop', 'page-past' );
    				?>
    

    This is the code that was working for me when I first started using Sentence in 2013. However, when I changed the php to the following (changing “page-past” to just “past” the template is now displaying fine.

    
    $avia_config['size'] = 'page';
    				get_template_part( 'includes/loop', 'page' );
    				?>
    
    #603419

    Hi!

    Glad to to hear you figured it out! Let me know if you need further assistance with anything else.

    Best regards,
    Jordan

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.