I watched a video on youtube about using WP as a CMS. My client doesn’t want his site to be a blog but just a normal website that he can add content to. When I try to follow the video there is one major problem…I create a new page but on the right side there is no way to choose default template or anything else. I have my own design that I created in HTML/CSS. I feel that I am missing templates that come with other themes that are required. Please take a look at the video http://www.youtube.com/watch?v=1o2XcHqQbRY and let me know how this person is doing this. My site is at http://foxdenwebsolutions.com/test. There will be 6 pages total. Thanks.
I create a new page but on the right side there is no way to choose default template or anything else
this means that you don’t have any page template in your theme;
start by creating one or many – http://codex.wordpress.org/Pages#Page_Templates
I did use this code at the top of all my HTML pages as in the video – <?php /* Template Name: Home */ ?>, <?php /* Template Name: Noise 101 */ ?>, etc. Is this what you are talking about? Or do I need to create something else that is a page.php?
at the top of all my HTML pages
does this mean your ‘templates’ have a .html extension?
a page template will need to be a .php file.
I’m sorry….I saved all the HTML pages as PHP pages.
I removed all the .php pages that I created and started over. In the themes folder before adding the pages, there is header,php, index.php, style.css, functions.php, sidebar.php, and footer.php. I took my index.html page added the code – <?php /* Template Name: Home */ ?> – and saved it as home.php. Now I can choose either default template or home page template. I chose Home and pasted my HTML in the editor for the page under the HTML tab. There is absolutely no style to at all. I changed to default template and it shows my styles. I am so confused. I have read through the Codex on creating pages and it is not making sense to me. All pages will be static but editable by the client. How do I go about doing this? Also how do I get MY main nav and footer nav to work?
I just don’t get how to do this. I know HTML/CSS but this is beyond me! Please help me learn how to do this!
Do not use home.php as a template name (certain names are reserved) ,use a unique name (mynewpage.php is OK)…that said, also note:
Try switching to the default twentyeleven theme, deactivating all plugins, and then attempting again to associate a page or post with a custom template…many themes either block or do not work with such. If you can get it to work with default theme, activate plugins one at a time to test each (review if compatible with your version of WP), but not a caching plugin yet (activate when all site testing is complete)…
I followed the instructions from SwansonPhotos and this did not work. It worked with another theme installed. These are the php pages I have in my custom theme that was created from the HTML/CSS design I created for my client – header.php, index.php, sidebar.php, footer.php, functions.php (to register custom sidebars), and the new homepage.php page. I took what was on the index.php page and placed it on the homepage.php page with the PHP code that makes it a template. When I try to add a page called Home there is still no drop down in the page attributes section on the right. I don’t have any plugins installed. Both sidebars are widgetized so I don’t know if that is causing the problem. Back to step one…..how to I turn WP into a CMS where I can control the content of 6 pages of HTML code. BTW, there are 3 CSS pages associated with the site for a responsive site and a CSS page for the image slider at the top. The home page will be 3 columns with left and right sidebars and the other pages will be 2 column with only the right sidebar.
What I have noticed is that I cannot get away with removing the index.php page. It has to stay. Could I possibly use that without the Loop to have it be the home page and then add pages for the 5 pages in the site? I am sorry that this is confusing me so much. I just can’t wrap my head around this. Creating a static website is what I am used to doing. However, I DO want to learn.
You actually need a page.php to start with to make your custom template, like for a static home page or your about us page.
And to use pages instead of posts for content.
If this is a theme you downloaded and then tweaked, go make sure there wasn’t a page.php in the theme download.
You can always take a look at page.php in twentyten or twentyeleven, they are different, and use that as a starting point.
This is actually my own theme I created from the HTML site I created. No there is no page.php in it. So do I leave the index.php page alone as I built it? What do I add to the page.php? I am looking at the TwentyTen page.php and it has this code-
<div id=”content” role=”main”>
/* Run the loop to output the page.
* If you want to overload this in a child theme then include a file
* called loop-page.php and that will be used instead.
get_template_part( ‘loop’, ‘page’ );
</div><!– #content –>
</div><!– #container –>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Would I just paste in my container code? –
Not sure what get_template_part is?
For the other pages that only have the right sidebar how do I go about creating those if it has to read off of the index.php which has both sidebars?
I am thinking static site and the idea of having serveral different pages put together to create ONE page is not what I am used to. It would be a lot easier if WP actually worked that way…just upload my static pages and then the client can do what he wants.
Have you read (and researched) the WordPress Codex?
It sounds like you are asking developer-related questions without having a proper understand of how the WordPress framework functions (which can be extremely frustrating to you).
WordPress is unlike static HTML sites. It is possible to replicate a static HTML site, but it will take some modifications (as you are finding out).
In order to understand how these modifications interact with WordPress, it’s important to understand the framework.
Here is a great page in the codex to get started understanding templates, and how they work:
Page.php from twenty ten will give you right sidebars.
The only way to know if this will work for you is to upload page.php to your theme folder.
Then create a custom page from it, (just copy and paste into new template
Then see if you can actually pull up the template in the editor section.
The index.php seems to be working nicely. If you can get a page template to work, you can use that as a static front page and then use the (blog posts) index page as news or something like that.
Seeing’s how you are new to WP and starting with a custom theme, you have quite a learning curve ahead.
I am reading the Codex page that Josh pointed out. I understand that the header, footer, maybe sidebar pages are put together with the index page, which seems to be the main part. Now if I want other pages to have a different look, I would create a different named something like twocolpage.php to hold that different look?
- The topic ‘Help with using WP as a CMS’ is closed to new replies.