Get template part name
-
Hello
I am making custom sidebar with WP Custom Search. Each category would have separetecustom search. So when i choose category page my if sentence works, but when i make search custom search change. So page is calling template_part search, and i would like to include that in my if sentense.
Code:
<?php if (is_category('avtodomi') || is_page_template('loop1.php')) { $preset='preset-2'; } else { $preset='default'; } ?>Thanks a lot to all for help.
[Please post code snippets between backticks or use the code button.]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Get template part name’ is closed to new replies.