What’s the best way to add private API keys to a basic custom theme?

[ad_1]

Hi. I’ve built a pretty basic theme for someone and it uses a few private API keys like the Google Maps API. At the moment, it’s hardcoded in the theme file (it’s not committed to the repo so it’s safe) but is there any better way to do this? For example, should I create a basic plugin for the API keys to store in the database?

Thanks

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer