Community Forums › Forums › Archived Forums › Design Tips and Tricks › Creating a Simple Custom Page Template
Tagged: Custom Post Page Template
- This topic has 12 replies, 2 voices, and was last updated 8 years, 11 months ago by Brad Dalton.
-
AuthorPosts
-
May 6, 2015 at 7:22 am #150362jbendinerMember
I am trying to create a CPT for my portfolio display.
All I need is a full width layout for now.
I added a new file called page_portfolio.php with the following basic code:<?php
/**
* This file adds the Portfolio template to the Parallax Pro Theme.
*//*
Template Name: Portfolio
*/// Force full width page layout
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );//* Run the Genesis loop
genesis();I then created a page and selected the Portfolio template I create above.
When i display it it does not show it full width:
http://logisticsnetworkdesign.com/portfolio-test/What did I miss here?
http://logisticsnetworkdesign.com/portfolio-test/
Thanks
JerryMay 6, 2015 at 1:11 pm #150413Brad DaltonParticipantUse the full width Layout Settings on every Edit Page screen.
Or
Add this to the file:
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
May 6, 2015 at 1:34 pm #150442jbendinerMemberHi Brad,
If you check the php file I created, it does include the statement you suggest (in fact I followed an article you wrote on this subject..). My file is called template_portfolio.php and the template is created, but doesn't display full width. The php code is as follows:<?php
/**
* This file adds the Portfolio template to the Parallax Pro Theme.
*//*
Template Name: Portfolio
*/// Force full width page layout
add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ );//* Run the Genesis loop
genesis();Thanks
JerryMay 6, 2015 at 2:44 pm #150464Brad DaltonParticipantMay 6, 2015 at 2:48 pm #150466jbendinerMemberIt is set to header+ no sidebars...
May 6, 2015 at 2:58 pm #150467Brad DaltonParticipantMay 6, 2015 at 3:09 pm #150469jbendinerMemberif i select that one it displays the default layout: content+widget
I want no widgets - full width, that is why I selected the fourth layout in your picture
Not working.... as you can see it displays the page without widgets, but not full widthMay 6, 2015 at 3:18 pm #150483jbendinerMemberSorry, I mean I selected the sixth layout in your picture (header+no sidebar)
May 6, 2015 at 3:23 pm #150495Brad DaltonParticipantMay 6, 2015 at 4:21 pm #150497jbendinerMemberI may have found the problem Brad.
I think (need to confirm it) that in the Parallax theme the width you see in my example is the full width.
It does not cover the entire width as we would expect.I say that because I checked the landing page in the demo:
http://my.studiopress.com/themes/parallax/#demo-fullAnd then I checked the corresponding php for the landing page in the theme:
It includes the full width statement://* Force full width content layout
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );From this I deduct that at least in this theme the full width is narrower.
If so, is there a place in the THEME files where the full width size can be adjusted?Thank you for your feedback.
JerryMay 6, 2015 at 4:37 pm #150499Brad DaltonParticipantYou can change the width in the style sheet under the Structure and Layout section.
May 6, 2015 at 8:34 pm #150515jbendinerMemberSolved the problem!
It was the padding settings for the full-width layout in style.css - rows 1289-1291May 6, 2015 at 9:29 pm #150521Brad DaltonParticipant -
AuthorPosts
- The topic ‘Creating a Simple Custom Page Template’ is closed to new replies.