Solved

a couple of general questions about WordPress development

Posted on 2013-05-28
7
235 Views
Last Modified: 2013-05-30
Hi friends. I am developing a web site in WordPress. The front page will look like the attached image; the interior pages will look somewhat different. I am new to WordPress. I have a few questions.

1) How can I develop different templates for WordPress -- front page template; internal page template; another internal page template; etc.?

2) I am using, as my framework, the Foundation WordPress theme, a free and responsive theme from http://fwp.drewsymo.com / Author: Drew Morris.

Do you suggest that I simply develop the CSS/HTML for these templates (front page; internal), and adapt that CSS/HTML to this framework? Or should I develop within the framework itself -- I have tried doing this, but my results are erratic since I do not fully understand how Drew Morris put together the CSS for this framework.

Please give me your advice. I am in a crunch to develop this site. Thank you very much for your time and expertise.

Eric
PALPARTNERS-ImageSmart-WEB-FINAL.jpg
0
Comment
Question by:Eric Bourland
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 39202421
You can create custom templates under any theme.

http://codex.wordpress.org/Pages#Page_Templates

I would stay within your chosen framework because all you need to do is modify the basic page template and change the existing HTML and CSS as you need.
0
 
LVL 3

Author Comment

by:Eric Bourland
ID: 39202555
Jason, thank you.

So, then, should I make separate templates for the front (index) page and the interiors pages?

Also, should I edit header.php and footer.php, if these will be the same for all pages?

Finally, do I ever edit page.php, if I am using only my custom templates?

Thank you again.

Eric
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 39202581
Yes, I would make separate templates for front and interior.   Read about Template Hierarchy on the WordPress codex to see how you can use templates in nifty ways.  

You can edit header and footer if you want to make global changes.  You can also use various WordPress conditional functions like is_home() to have special content for specific pages.  

You don't need to edit page.php if you are using your own templates unless you want a different default whatever to be present in page.php.
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 3

Author Comment

by:Eric Bourland
ID: 39202626
This is making more sense.

So, to create a new page template such as interior_page.php. I would begin that file thus:

<?php

/*

Template Name: interior_page

*/

?>



<?php get_header(); ?>

Open in new window


Correct?
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 39203550
Correct?

Pretty much.  A custom page template basically is this:

<?php
/*
Template Name: Name it.
*/
//Display the header
get_header();
//Display the page content/body
if ( have_posts() ) while ( have_posts() )
{
the_post();
the_content();
}
//Display the footer
get_footer();
?>

Open in new window


Just add HTML and CSS as needed to match the layout you have in your head.
0
 
LVL 3

Author Closing Comment

by:Eric Bourland
ID: 39208817
Jason, really helpful. Thank you very much. I might come back here with a few more questions. All best.

Eric
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 39208824
I might come back here with a few more questions.

That's what the site is here for.  Good luck!
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AdminLTE with wordpress 15 223
Need help with WordPress On-click Action functionality 3 60
Split wordpress loop 35 62
Mail Server IP address - part 2 1 21
What's this? As a volunteer Page Editor for Experts-Exchange.com, I have noticed that many authors also have blogs, and pull articles from their blogs to post at Experts-Exchange. I appreciate each author sharing their blog content with our site …
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question