get_template_part() doesn't work
I use get_template_part() function to get theme options page content like
this:
function setup_theme_admin_menus() {
add_theme_page( "Theme Options", "Theme Options", "read",
"theme_options", "theme_options" );
}
function theme_options() {
get_template_part("content","options");
}
And it seems to work perfect when I use it on my localhost but when I
relocated it online it stopped rendering desired HTML. When I use
something like:
function theme_options() {
echo "Hello World!";
}
It works as expected both online and locally. No idea why it is happening.
No comments:
Post a Comment