March 15, 2017
•Last updated November 5, 2023
How to Code HTML to WordPress - Part 2
Part 2 of the "How to Code HTML to WordPress" screencast series is dedicated to optimizing the theme for development as well as the beginning of making the main nav dynamic.
The underscores starter theme is a great start but I tend to optimize it a bit further for my own workflow.
Because our HTML template makes use of different directory names and file names I needed to tie things all together. In the video, you'll see me edit the functions.php
file as well as create a few new files so our single page design has its own dedicated page.
Naming Conventions in WordPress
If you're a seasoned WordPress developer you might know that WordPress is smart in the sense of naming conventions. For instance, I created a file called front-page.php
and WordPress knew to override the existing index.php
file and use the one I created instead. You can also do the same thing if you named your file home.php
.
If you'd rather create a page in the dashboard area you can do so and use the built-in static page setting found under Settings/Reading
.
Within this configuration, you can declare a static home page and then tell WordPress where to add your "blog": the place where all your posts will appear.
In the video, I discuss this a bit further so if it's not 100% clear that's okay. Be sure to always refer to the documentation if you're having trouble. I frequent it all the time!
Following along? Download the source code:
Get notified
Be sure to subscribe to either my newsletter or my YouTube channel to receive notifications on future videos/content. My newsletter goes out every Sunday and I try to publish new content for both the blog and YouTube channel twice a week.
Some useful Links:
The Series So Far
Categories
Collection
Part of the How to Code HTML to WordPress collection
Products and courses
-
Hello Hotwire
A course on Hotwire + Ruby on Rails.
-
Hello Rails
A course for newcomers to Ruby on Rails.
-
Rails UI
UI templates and components for Rails.