0

I have an assignment from a customer to transform a custom made static HTML website to a WordPress website. First I thought "That's easy, just make a theme & import it all there & link it up".

But it appears that you can't use the normal WordPress tools on those theme pages (customer wants this), the theme pages doesn't show up on the "Pages" in the backed menu, and I also don't find them in the SQL-database as I do with "normal" WordPress pages, they are just php files in a folder structure on the server.

Am I doing something wrong/missing something? (probably?, What?) (I have added the php get_header() stuff & such, hopefully all of it?).

Or can I do this in some other way? so it becomes a "true" fully functional WordPress page?
Or do I HAVE to rebuild the whole damn webpage inside WordPress itself?

When I'm googling this almost all I find is "make a theme" answers, which I believe is not good enough?

Thanks for any help!

5
  • Well the answers you're finding are correct. You need to make a theme. It's hard to get more specific than that. You need to look at the original markup and content of the HTML site, and decide what needs to be managed through the WordPress interface, then you need to figure out what the best WordPress feature would be for managing that content, and then implement them in the theme. For example, a menu would be best managed by the WordPress Navigation Menus feature, so your theme should implement that. Commented Sep 21, 2021 at 12:43
  • There's nothing unusual about this process, which would be the same for any CMS or framework. The HTML needs to be converted to templates that use the platforms APIs to populate data entered by the user. The developer documentation for WordPress is here: developer.wordpress.org/themes I believe there are tools that claim to be able to automate this process, but I've never tried them and would be incredible wary of them. Commented Sep 21, 2021 at 12:46
  • Ok, so I can't like insert whatever code WordPress would expect a page to have & then "trick" WordPress to think that it is an actual webpage that WordPress have done itself? I mean, all the html, javascript & css have already been done for the old site, can't I at least re-use parts of that code? without having to rebuild the entire site again? Commented Sep 21, 2021 at 14:12
  • It depends on what you mean my rebuild. Converting static webpages into templates for WordPress, or any other CMS, is extremely common. But usually those were built with the CMS in mind. If you've just got a static HTML website that was built without any consideration for how it would work in WordPress, it's probably going to be a very difficult task. If you have no existing expertise with WordPress, then this is an odd task to take on, and I expect it will be quite difficult. Commented Sep 21, 2021 at 14:46
  • I'm fairly certain I have enough knowledge & experience to do this, worst case scenario I have to rebuild it all from the ground up, (which I want to avoid if possible, it will take like 10x longer & might not look identical to before). No, the website was not built with WordPress in mind, or at least those who built it thought it was just to upload the files, and now I have to fix it. Commented Sep 21, 2021 at 15:01

1 Answer 1

2

Yes, the answers you're finding are correct. WordPress, like most CMSs, separates the content from the presentation. This means that you put all the templates for styling inside the theme, and then you enter all the content in the editor.

That's not to say there aren't other ways to do things, but that's the most common use case for WordPress and most likely what your client is expecting. Most clients would not have any need for you to convert their HTML pages into PHP ones - that PHP alone wouldn't bring them much benefit, and if they don't want to (or can't) update their existing HTML pages they won't want to (or won't be able to) update PHP either. The benefit for them in switching from static HTML to a WordPress site is that they'll be able to use WordPress's editor to enter their content, all while knowing it will be shown with the correct header, footer, sidebar, etc. automatically.

So, to complete this task, you'll want to delve more in to the Theme Hierarchy and it typically makes sense to set up a child theme rather than a theme from scratch for your first WP project. You can probably find a theme that has a layout similar to what your client wants - and then create the child theme to tweak and fine-tune things. Once the theme is set up, someone will also need to input all the content - meaning upload all the images, and create all the Posts and Pages. It sounds like you as the vendor may not have scoped this fully yet to the client's needs, so if possible, it would be wise to write up a more formal and complete statement of work that specifies who will input the content. Sometimes clients will, other times they expect the vendor to, but setting expectations before you go further will help smooth the process.

Not the answer you're looking for? Browse other questions tagged or ask your own question.