Community Forums › Forums › Archived Forums › General Discussion › Single page full width layout not working
Tagged: full width, layout, templates
- This topic has 7 replies, 3 voices, and was last updated 9 years, 1 month ago by
jonbrantingham.
-
AuthorPosts
-
December 9, 2015 at 2:02 pm #173362
jonbrantingham
ParticipantI am currently using the Learndash LMS plugin to have a membership site.
I am using custom page templates for my course pages. The template is supposed to force the full-width genesis layout. It seems to be working for two course pages, but not for the third.
It is not working for this page: http://www.artofcomposing.com/courses/music-composition-101
It is working for this page: http://www.artofcomposing.com/courses/music-composition-201-sonata-form
The theme is set to have full width as the default, and I can't seem to find any other settings in my theme that would not force the full-width
Here is the code for the page template:
http://www.artofcomposing.com/courses/music-composition-101<?php /** * This file adds the Course Page template to the Art of Composing Theme 2015 Theme. * * @author StudioPress * @package Art of Composing Theme 2015 Theme * @subpackage Customizations */ /* Template Name: Courses */ //* Force full-width-content layout setting add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); /** Remove default sidebar */ remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); //* Hook sticky message before site header remove_action( 'genesis_before', 'aoc_sticky_message' ); add_action( 'genesis_before', 'aoc_course_sticky_message' ); function aoc_course_sticky_message() { genesis_widget_area( 'course-sticky-message', array( 'before' => '<div id="course-sticky-message" class="sticky-message">', 'after' => '</div>', ) ); } //* Add landing body class to the head add_filter( 'body_class', 'aoc_add_body_class' ); function aoc_add_body_class( $classes ) { $classes[] = 'learndash_course_page'; return $classes; } function learndash_custom_breadcrumbs() { echo '<div id="breadcrumbs">' . learndash_breadcrumbs() . '</div>'; }; //* Modify the comment link text in comments add_filter( 'genesis_post_info', 'sp_post_info_filter' ); function sp_post_info_filter( $post_info ) { return '[post_comments zero="Leave a Review" one="1 Review" more="% Reviews"]'; } //* Remove breadcrumbs remove_action( 'genesis_after_header', 'genesis_do_breadcrumbs' ); add_action('genesis_after_header', 'learndash_custom_breadcrumbs'); //* Remove the entry title (requires HTML5 theme support) //*remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); //*add_action( 'genesis_before_content', 'genesis_do_post_title' ); //* Remove meta info for page remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); //* Remove the author box on single posts HTML5 Themes remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 ); //* Remove the post meta function remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); //* Run the Genesis loop genesis();
December 9, 2015 at 2:20 pm #173366carasmo
ParticipantI'm thinking because it's a post see: https://gist.github.com/braddalton/5547550.
I see that you've worked it out. Mind sharing what was going on?
December 9, 2015 at 2:33 pm #173369jonbrantingham
ParticipantThat code from github didn't seem to fix it.
I haven't actually worked it out. The problem that I face, is that only one page seems to have the wrong layout. Every other course page has the correct full width layout. I can delete the page, because it has a bunch of other lessons attached directly to it.
I just can't figure out why.
December 9, 2015 at 2:47 pm #173370carasmo
ParticipantThat particular page/post layout settings are full width as well (set on the page itself, not globally). I've never had this happen unless I've ticked a different layout for a specific post or page, which I think over rides the force behavior though I haven't thoroughly checked this.
December 14, 2015 at 1:48 pm #173790jonbrantingham
ParticipantI still haven't been able to figure out why it's not working. Does anyone have any other ideas for fixing the formatting on the page.
Setting it in the template isn't changing it for some reason.
Because it's a custom post type, there is no option to set it in the editor.
Changing the default for the theme doesn't work either.
And it's not set as the default in functions.php.Help...
December 14, 2015 at 3:16 pm #173792Precisi
MemberHi! I'm totally new to this community so I may be way off base helping here, but... if it's only that one page that's causing the problem, why not duplicate it? Make sure the new copy is working correctly, then delete the old one and rename the slug on the new one to match the old one? Then all of your links should work if you're using rewriting on your site links? I've had pages just get totally 'stuck' before for unexplained reasons and this trick usually worked for me. It's possible the comments might get lost, though. I've never tried it with comments. (Obviously make a backup of your db first before testing this)
Another thought that's occurred to me is, have you made sure the sidebar is completely turned off? You said you looked everywhere to force full width, but could there be some sidebar setting that's still overriding that? Just some thoughts. As I'm a total noob to Genesis as of last night, I can't think of much else beyond that.
December 14, 2015 at 3:55 pm #173794jonbrantingham
ParticipantI'll look into a way to delete it without messing things up but it is a last resort. It is a "course" post type, so it has a lot of sub-pages, as lessons and topics. I am not sure what will happen if I delete it, and try to reassign those pages. As a membership site, it could be disastrous.
I'll still keep poking around though.
December 23, 2015 at 9:10 am #174636jonbrantingham
ParticipantJust in case anyone wants to know, the only way I was able to figure out how to change the page template was in myPHPadmin. I found the data in the postmeta table. It was a meta tag called "_genesis_layout". I changed it from "content-sidebar" to "full-width-content".
I am not sure why I was unable to change it directly from the page template, but it works now.
-
AuthorPosts
- The topic ‘Single page full width layout not working’ is closed to new replies.