Adding Custom Fields to a Custom Post Type, the Right Way


A tutorial for using the Advanced Custom Fields plugin when building new WordPress custom post types.

Source: Adding Custom Fields to a Custom Post Type, the Right Way

This is a great article, but WTF why would no one tell me when you create them, add fields, and then want to view them they will NOT SHOW UP… until you visit the Setting page for permalinks -> /wordpress/wp-admin/options-permalink.php (just visiting the page resets the cache)

Custom post types in WordPress

The easiest way to fix this is to simply visit your Settings > Permalinks page. You don’t have to save your permalinks but just visit the page. This will flush your rewrite rules.

Dear God, that was frustrating!

Also do not name the slug with a space in between words…

Now I can use templates to display the custom fields I created in the custom “content” type, a.k.a. custom “post” type.

good info-> https://developer.wordpress.org/themes/basics/template-hierarchy/

In my child theme folder ….

https://wordpress.org/support/topic/advanced-custom-fields-display-google-map-on-your-theme/

Leave a comment

Your email address will not be published. Required fields are marked *