How do I convert Bootstrap (HTML) to WordPress (PHP)? What are some good free tutorials or resources explaining the process of transferring an already built HTML site using Bootstrap to a WordPress site written in PHP?

Posted by:

First thing to make you clear, you can not just convert HTML to WordPress using bootstrap, but what you can do is create your theme markup using Bootstrap.

Now to convert you markup files to , you need to do the following tasks effectively.

  1. Download a fresh edition of WordPress from https://wordpress.org/
  2. Create a new directory in WP/content/theme and named it as your custom theme whatever you like.
  3. Now start creating few files inside that custom directory.
  4. First to make your theme visible to , create an style.css file in directory’s root, and add following as comments.

/*

* Theme Name: <your theme>

* Author Name: <theme author>

* Author URL: <author URI>

* Description: <description>

*/

   5.  One thing to understand here, WordPress plays around with these comments  as associative arrays, consider them as key-value pairs.

  6.  Next step you can create few important files, such as:

  • Index.php
  • Page.php
  • Single.php
  • Header.php
  • Footer.php
  • Functions.php
  • Search.php
  • 404.php

7.  These are pretty basic practice for almost every WordPress site.

8.  Now, if you wanted to know how these file-naming conventions work in WordPress, you can look out for WordPress Information Architecture

9.  Now you can put your css/js/img directories and put in your stuff, and that will be all.

10.  Moreover if you do not want to confuse yourself with WordPress complex naming code-base for its custom methods/functions, give a try to Timber.

you can find it at Timber.

0

Add a Comment