Can I set a global base path for get_template_part?

Is there a way to apply a global setting, so that get_template_part always uses a predefined base path? For example, I always put my templates in a directory called 'template-parts', and it'd be nice to not have to always include that in the first argument string.

I know I could probably call a custom function that calls get_template_part, but I was wondering if there was a slightly more elegant way of doing it.

Topic get-template-part configuration Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.