Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

hi all i have a few questions on wordpress ^o^

hi everybody, i have an question to ask for solution. I have a html + css pages developed, just like usual practice , i separate it into header.php, footer.php,sidebar.php , index.php

  • First i don't know what i can do if the header , footer or even sidebar need custom content amendment , then what should i do in order to make the content in those header ...footer...can be amend.

*Secondly , i am ambiguous on the page developed. for example , if a page is call contact then i usually call it contact.php for wordpress site, but is it correct? Indeed is it another way to name the page?

*third , how can i make a wordpress page 's content can be custom content (that means can be amend by people)

*last , how i can set the relative path for my js file, since it is located in my wp-content , so i need to move it to the same folder level in order to make the js script work.

Thank you for all your help

1 Answer

Caroline Hagan
Caroline Hagan
12,612 Points

Hi Priscilla,

Sorry a little confused; are you building HTML/CSS pages, PHP pages, or a Wordpress website?

If you are building a Wordpress website and would like to edit content in the Header, Footer includes, you can either create Widget areas to edit text or add news posts etc, or, use a plugin to enter Custom Fields to make them editable.

You can name your page templates anything you want, so long as you have the code in the top of the file, to allow you to use that template in the Wordpress admin, e.g.

<?php
/**
 * Template Name: Page of Books
 *
 */
 get_header(); ?>

As long as you include the following code in your Page template:

<?php the_content(); ?>

... then people can edit that page using the wordpress WYSIWYG.