I tried adding a frontpage.php
file to the content directory, but that wasn’t being loaded. Now I’ve added the following snippet to assure I’m getting a context of ‘frontpage’:
add_filter('cfct_context', 'scompt_front_page_context');
function scompt_front_page_context($context) {
if( is_front_page() )
return 'frontpage';
return $context;
}
That is allowing me to create a frontpage.php
file in the loop directory, but I’m still unable to get it to use my file for the content.
Not exaclty sure what you’re trying to do, but in order to use a page template in WordPress, you must have this at the top of the file:
and that goes before
And in order for WordPress to use the template, you have to select it in the page editing area in admin.
So, for a “frontpage,” use a template named home.php – with the template name as above – and select it as the template to use in the page editor.
you need two pages to get this to work.
page_example.php (make newfile in same directory as page.php)
pages/page_example.php (copy and rename page_default.php)
page_example.php
must have this header only
and
pages/page_example.php is the page it calls so really all your changes need to be in here.
ie remove the side bar, get_sidebar();
now select this page as usual when you are creating a page.
The index.php file is used on the front page of your wordpress blog. Edit (or create) the index.php file to make changes for the front page of your blog.
The correct name of the file needed to replace the front page template is front-page.php not frontpage.php
This is actually a problem in the utility.php file (in the carrington core). There is a function that tells it how to get/determine the content for any given situation. The code looks like this (around line 500):
}
You need to add another case in there to have it check for the front page content template path…this would be the code (in this example, the front page is “front-page.php”):
I added that right above the default case, and it instantly solved the problem of Carrington calling the default content rather than the front page content template.