Forum Replies Created
-
AuthorPosts
-
bibliofilleMember
Ok, here's the link: http://codex.wordpress.org/Page_Templates#Specialized_Page_Template
bibliofilleMemberbibliofilleMemberYes, that does make sense! Thanks for clarifying!
I read in the Codex that naming a page template "page-xyz" causes WordPress to view it as a specialized page template.
Here is the link: It's under the section "File Names."
I took this to mean that I couldn't have "page-about.php", "page-design.php", "page-reviews.php", etc in my child theme directory. That seemed to be true because when I did it that way, WP recognized that there was a custom page template, but wouldn't use it when I selected it from the page WYSIWYG editor.
I actually kept "page-about.php" but changed everything else to "design.php" and so forth and it worked, so that must have had something to do with it.
bibliofilleMemberYes, that's correct. I actually had to change "page-design.php" to just "design.php". And I have a page template for a reviews page that's saved as "reviews.php". It didn't work when I had it saved as "page-reviews.php".
So you're saying that I can either call the sidebar directly in the page template or have a "sidebar.php" file and call it in "functions.php" with a conditional, but I don't need to do both?
bibliofilleMemberHere's what's in the about page template, called "page-about.php":
<?php /** * Template Name: About Page * * A custom page template for the about page. * * @package Kim_Schwede */ get_header(); ?> <?php dynamic_sidebar( 'sidebar-about' ); ?> <?php genesis(); ?> <?php get_footer(); ?>
bibliofilleMemberI got it to work by changing the template file names; I was messing up the template hierarchy.
What's wrong with the method I was using? I ask because I'm a new developer and still learning the best way to do things.
bibliofilleMemberThanks for the help! I'm still wondering what I'm doing wrong. I added the theme name, but I still end up with a blank screen when I try to register and display the widget.
I'm adding the code to the bottom of the functions.php file in my child theme.
bibliofilleMemberWhat if my theme doesn't have a front-page.php file? Should I create one?
I'm using a basic genesis child theme that I created. Right now it just has a functions.php and style.css file.
-
AuthorPosts