WordPress - 我会在哪里放置自定义类和数据库调用?

WordPress  - 我会在哪里放置自定义类和数据库调用?

问题描述:

I'm working on a WordPress CMS site and I want to add my own classes that make my own calls tot he WordPress database. Where would be the ideal place to put these so they are easily accessible? I'm guessing it would go either in wp-content or wp-includes but I don't know which.

Thank you

我正在使用WordPress CMS网站,我想添加自己的类,这些类可以自己调用 WordPress数据库。 放置这些的理想位置在哪里可以轻松访问? 我猜它会用wp-content或wp-includes但我不知道哪个。 p>

谢谢 p> div>

You should put them in your template folder, in the functions.php file.