Twenty Twelve Full Width custom page
-
Hi all,
I have created a page template in my child theme which is working fine, but I now want to make it full width. I have found this post which seems to point exactly what I want to do, however I cannot get this to work.
The code exert I am using is the 3rd post down by Drew Jaynes, and the issue I believe is my linking to the new ‘YOURS.php’ or my template name. I have added this code to my childs functions.php and placed the article page template in 3 locations, trying various different paths, but none of these seem to work:
twentytwelve/page-templates/article_page.php
twentytwelvechild/page-templates/article_page.php
twentytwelvechild/article_page.phpfunction childtheme_content_width() { if ( is_page_template( 'page-templates/article_page.php' ) ) { global $content_width; $content_width = 960; //Or whatever width you want } } add_action( 'template_redirect', 'childtheme_content_width' );
Obviously best practice would be to keep it in the child theme’s folder and in a similar directory to the twentytwelve as makes sense.
Site location of custom page showing issue https://coder-tronics.com/articles-2/
But how?
Many thanks,
Ant
- The topic ‘Twenty Twelve Full Width custom page’ is closed to new replies.