Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 832 Bytes

README.md

File metadata and controls

20 lines (15 loc) · 832 Bytes

Hemma-Apartments-CPT

Code to be used in Hemma Child theme to add a new Custom Post Type named "Apartment" (based on Rooms CPT).

How to use it

Copy all functions included in functions.php file and paste them at the bottom of the functions.php file included in your Hemma child theme.

Copy the following files into the child theme directory:

  • single-apartment.php
  • template-apartment.php

Activate the child theme and you're ready to go!

Rename the CPT

If you want to use a different CPT name, replace these occurrences in functions.php file as well as in single-apartment.php and template-apartment.php:

  • "Apartment"
  • "apartment"
  • "Apartments"
  • "apartments"

Finally, rename single-apartment.php and template-apartment.php, you should make sure to replace the "apartment" with the name of your new custom post type.