Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Jul 2012
    Posts
    79
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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.

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,474
    Thanks
    6
    Thanked 980 Times in 953 Posts
    The template files are located in /wp-content/themes/[theme name]

  • #3
    New Coder
    Join Date
    Jul 2012
    Posts
    79
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,474
    Thanks
    6
    Thanked 980 Times in 953 Posts
    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.

  • #5
    New Coder
    Join Date
    Jul 2012
    Posts
    79
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.

  • #6
    New Coder
    Join Date
    Jul 2012
    Posts
    79
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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?

  • #7
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,474
    Thanks
    6
    Thanked 980 Times in 953 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •