I am trying to use get_template_part when creating a page in the admin section of my site. However, it does not seem to be working. Does this function not work in the admin section? What alternative can I use?
1 comment
Comments are closed.
I am trying to use get_template_part when creating a page in the admin section of my site. However, it does not seem to be working. Does this function not work in the admin section? What alternative can I use?
Comments are closed.
Yes, get_template_part() does work on Admin pages. Here is how I tested:
Add this to functions.php theme (or child theme) file:
The
admin-test.php
file contains the following: