Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #252427

    edit: might have asked the wrong question. please close this. full width working when using a copy of template-builder as custom template.

    Hi,
    was trying to create a custom template but somehow the color sections were not full width.
    I copied page.php and all i’ve done was adding the template name.
    But even using a copy of page.php as a template, the color sections i add are not full width.

    I am using the boxed layout and the color section is 1030px instead of 1130px.
    Looks like the color section is placed inside

    <div class="template-page content twelve alpha units">
         <div id="av_section_1" class="avia-section main_color avia-section-default avia-no-shadow …av_textblock avia-builder-el-first
          container_wrap fullsize" style="background-color: #2AB73F;">
         </div>
    </div>'
    
    grid.css:197 .responsive .container .twelve.units 1030px
    #top #main .avia-section .template-page 100%

    When using the standard tamplate the color section is placed outside of that div container.

    So how can i fix this?
    Am i doing something wrong when creating a template with page.php as a base?

    #252687

    Hi Flikk!

    Can you post the link to your page which you have created using your custom page template so we can take a look?

    Best regards,
    Yigit

    #252729
    This reply has been marked as private.
    #252968

    I guess you did not see it yet.
    Since the website is not live, can you test the color section full width in a custom template on your test server?
    All i did was copy the page.php and added the template name.
    Then try to create a page with a full width color section in a boxed layout.
    Color section should be 1130px but is only 1030px.

    Template:

    <?php
    	/*
    	Template Name: test custom template
    	*/
    global $avia_config;
    
    	/*
    	 * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
    	 */
    	 get_header();
    
     	 if( get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title();
    	 ?>
    
    		<div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>
    
    			<div class='container'>
    
    				<main class='template-page content  <?php avia_layout_class( 'content' ); ?> units' <?php avia_markup_helper(array('context' => 'content','post_type'=>'page'));?>>
    
                        <?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'] = avia_layout_class( 'main' , false) == 'entry_without_sidebar' ? '' : 'entry_with_sidebar';
                        get_template_part( 'includes/loop', 'page' );
                        ?>
    
    				<!--end content-->
    				</main>
    
    				<?php
    
    				//get the sidebar
    				$avia_config['currently_viewing'] = 'page';
    				get_sidebar();
    
    				?>
    
    			</div><!--end container-->
    
    		</div><!-- close default .container_wrap element -->
    
    <?php get_footer(); ?>
    #253516

    Hey!

    When using the ALB and any of the full width elements it no longer uses the page.php template. It uses the template-builder.php file instead which has custom support for opening and closing the divs correctly.

    Edit: Just saw your edit when doing my re-read of the question :)

    Regards,
    Devin

    • This reply was modified 10 years, 8 months ago by Devin.
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Color section not full width with template (template = page.php copy)’ is closed to new replies.