Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-01-2012, 07:39 PM   PM User | #1
The Noob Coder
New Coder

 
Join Date: Jul 2012
Posts: 72
Thanks: 1
Thanked 0 Times in 0 Posts
The Noob Coder is an unknown quantity at this point
Question I can't find my site's HTML pages on our server, using Wordpress CMS.

My company uses Wordpress as their CMS, and I wanted to edit some of their web pages. For the life of me, I don't know where the actual HTML pages are kept on the server. Does anyone know where I would find them by default if they are using Wordpress? I found all the media (images, etc.) that the site uses on the server in a WP directory, but I can't find the actual HTML files.

Right now I have to settle for editing the page through the WP editor and it's annoying because I only have access to the contents within the body tag!

I think they host with GoDaddy, if that matters.
The Noob Coder is offline   Reply With Quote
Old 08-01-2012, 11:08 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,579
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
The template files are located in /wp-content/themes/[theme name]
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 08-01-2012, 11:39 PM   PM User | #3
The Noob Coder
New Coder

 
Join Date: Jul 2012
Posts: 72
Thanks: 1
Thanked 0 Times in 0 Posts
The Noob Coder is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
The template files are located in /wp-content/themes/[theme name]
I don't see any HTML files here though. Mostly php and a single CSS file.
The Noob Coder is offline   Reply With Quote
Old 08-02-2012, 02:56 AM   PM User | #4
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,579
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
OK, I was actually gonna write that in the first place but then I thought I might have misunderstood you, but now I’m writing it again because apparently I was actually right:

Wordpress – or any CMS that works with a database – doesn’t save actual static HTML files on the server that you can edit and transfer via FTP, it stores all the contents in a database, retreives them from there, and the PHP of which Wordpress is made compiles a page on the fly by putting various templates (code snippets) together and including the contents retreived from the database. This is the purpose of a standard CMS and this is why all the content is edited from the CMS’s admin panel, so that anybody can edit the content from anywhere right in a web browser, even without much knowledge of HTML.

Now, if you want to make structural changes to the code of the pages you see when you view your website you need to edit the template files. As mentioned, templates are pre-made code snippets that are put together to form the page. In the theme directory I mentioned in my previous post you find, for example, a header.php and footer.php file. If you open these with a text/code editor you see the HTML for the page header/footer in there, together with some PHP code that makes the page more dynamic (e. g. by showing the relevant title for each page). Also, there are more template files, the index.php file being the standard posts template and page.php the standard template for pages. If you edit the HTML in these files you will see the changes when you load a page or the post overview in the browser.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 08-02-2012, 05:32 AM   PM User | #5
The Noob Coder
New Coder

 
Join Date: Jul 2012
Posts: 72
Thanks: 1
Thanked 0 Times in 0 Posts
The Noob Coder is an unknown quantity at this point
Thanks for the detailed response. So I guess I have to edit those PHP files to see any results on the pages I need to edit.
The Noob Coder is offline   Reply With Quote
Old 08-02-2012, 10:15 PM   PM User | #6
The Noob Coder
New Coder

 
Join Date: Jul 2012
Posts: 72
Thanks: 1
Thanked 0 Times in 0 Posts
The Noob Coder is an unknown quantity at this point
Question

So I found the file that corresponds to the footer of the page and was able to make a few edits that I needed to make. Now I'm hunting for a few other parts of the site. Specifically where ever the CSS that controls the font is stored and the header (it's contents and such).


I found a file called header.php in the same directory as the footer.php that I edited. However, that header file doesn't seem to have the elements that you see in the header on the page at the website. For example on the website (Click here to see it), there is an image in the header along with a menu that I really need to edit (the font in the menu is an image and I need to make it actual text). Where could I search to find and edit the elements in the header?
The Noob Coder is offline   Reply With Quote
Old 08-03-2012, 01:40 AM   PM User | #7
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,579
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
The text in the menu is not an image, it’s generated through Cufón. However, since most modern browsers support @font-face nowadays, scripts like these aren’t really necessary anymore. As this appears to be a Wordpress plugin the only thing you need to do is disable/remove it from within the admin area.

Looking at the source code it looks like this is a fairly intricate theme with a lot of sub directories and includes and stuff. The best way to edit such a theme is downloading the entire theme directory, looking at the output source code in the browser for the element you want to edit, and doing a multi-file search (any decent code editor program can do this) for the element. This way you will easily understand the structure of the theme.

However, depending on the complexity of the theme there might be things that are specified in the admin area, not in the theme files. For example, if the theme has a dynamic menu the menu items are also stored in the database, not as actual HTML in a file, so that is edited in the “menus” in the admin area. Look if the theme has specific settings.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:32 AM.


Advertisement
Log in to turn off these ads.