Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

a couple of general questions about WordPress development

Posted on 2013-05-28
7
Medium Priority
?
264 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
  • 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
Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

 
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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
Transferring a wordpress site from a host or local dev server to another host can be a pain. So I've included my steps on how I have accomplished this task. Steps include an assumption that you have Cpanel access or Ftp access.. If you do not hav…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
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…
Suggested Courses

926 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