MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

How to create a WordPress custom theme? Part-3

How to create a WordPress custom theme?

In this blog, you’ll see how to call these files to each other. WordPress divided the all files to understand clearly.

The basic files which are needed to make a theme .

  1. Style.css
  2. Screenshot.png
  3. Index.php
  4. Header.php
  5. Footer.php
  6. Functions.php
  7. Front-page.php
  8. Sidebar.php
  9. search.php

Initially, we’ll begin to activate the created custom theme.

WordPress Appearance Themes screen with Custome Theme showing Activate and Live Preview buttons

2. It’ll be shown as a blank page because we didn’t have to mention anything about the theme.

Browser showing a blank page at localhost/wordpress after activating the empty custom theme

3. Let’s introduce the header and footer files to WordPress, so we need to download a custom HTML theme that is responsive too from any site. You can download from this site https://bootstrapmade.com/ also.

4. Just open the index file from your downloaded file . We have to convert this file into WordPress.

File Explorer context menu on index.html in the Restaurantly template folder, Open with Sublime Text

5. It’s the head section code. Just copy it from first line to body tag.

Sublime Text with the head section of Restaurantly index.html selected, from DOCTYPE to body tag

6. Go to your created custom theme folder C:\xampp\htdocs\wordpress\wp-content\themes\customtheme and create header.php file .

File Explorer in the customtheme folder with a new empty header.php file created

7. Paste that head section code into the themes folder’s header file. And save it.

Sublime Text showing header.php in customtheme with the pasted head section code

8. Now create footer file the custom theme folder.

Customtheme folder with footer.php, header.php, index.php, screenshot.png and style.css

9. Copy the footer section code till the end of closing body tag.

Sublime Text with the footer section code of Restaurantly index.html selected for copying

10. Paste this code into your footer.php file.

Selected footer section code in Sublime Text, ready to paste into footer.php

11. Copy this code form top bar to end main.

Sublime Text with index.html code selected from the Top Bar section onward

12. Now, all files are separated, then how we can call header.php and footer.php through index.php. WordPress defines its own function to call another file to other files. i.e. get_header(); and get_footer(); .

13. A PHP script starts with <?php and ends with ?>: You have to write the code between this. At the top , just write <?php get_header(); ?> It’ll call the header.php file

Index.php in Sublime Text with get_header() PHP call added at the top

14. At the end of index.php file, write <?php get_footer(); ?> to call footer.php file.

End of index.php in Sublime Text with get_footer() PHP call added after the main tag

15. Now, when you’ll refresh your site, its content will be shown easily.

Browser at localhost/wordpress showing unstyled Restaurantly content loaded by the custom theme

16. You can change your site name and give its tag within tittle tag.

Header.php title tag using get_bloginfo name and description to show the site name and tagline

17. At right upper-side, you can see.

Unstyled Restaurantly WordPress site on localhost with browser tab title Restaurant | Spicy Food

Thanks.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
With MotoShare.in, you can book a bike instantly, enjoy doorstep delivery, and ride without worries. Perfect for travelers, professionals, and adventure enthusiasts looking for a seamless mobility solution.

Related Posts

How to Import DOCX into WordPress with Mammoth: Text, Images, Tables and Code

A practical, single-file publishing workflow for bloggers, technical writers and DevOps training teams. Figure 1. Original featured illustration (1200 × 630 pixels). Writing an excellent tutorial is…

Read More

WordPress Typography Patterns: Styled Lists, Notice Boxes, and Code Blocks with Reusable CSS

This guide modernizes a legacy WordPress typography post into practical, reusable patterns for custom list markers, callout boxes, and code styling. It focuses on maintainable CSS and editor-friendly markup you can reuse across posts and documentation pages.

Read More

Moving a WordPress Site to Webflow: What Happens to Your Hosting, DNS and Email

Most guides about Webflow answer one question: is it the right builder for you? This one starts after that decision. You have a WordPress site on Bluehost,…

Read More

How to Choose the Right Website Development and SEO Partner for Your Business

A professional website has evolved far beyond a digital business card or an online brochure. Today, it serves as the core foundation of a brand’s entire online…

Read More

Docker Compose: WordPress + MySQL Using Shared Environment Variables

Create a project folder: Create a .env file: Create docker-compose.yml: Start the containers: Open WordPress: Now students can see how environment variables are passed into both containers….

Read More

Top 10 Content Management Systems (CMS): Features, Pros, Cons & Comparison

Introduction A Content Management System (CMS) is software that helps individuals and organizations create, manage, organize, and publish digital content without needing deep technical or coding knowledge….

Read More