0
votes
1answer
222 views

How to check if post has any tag?

I am displaying post tags like this: <div class="tags"><?php the_tags('<span>Tags</span>' , ' '); ?> </div> It works fine, but if the post does not have any tag, then ...
1
vote
3answers
394 views

Check if home.php and set home.php as page_on_front

I want to include a custom inline js on home page only. I havent set home page from reading section. I am using home.php file. function print_my_inline_script() { if (is_home() && ...
0
votes
2answers
921 views

Conditional tags issue for multiple is_page() conditions in sidebar.php

I've been pulling my hair out today trying to get this right. Basically I have a sidebar, which makes requests to individual files (such as sidebar-home.php, sidebar-residential.php) and different ...
4
votes
4answers
837 views

How to make plugin required in a wp theme without using php conditional statements when calling an individual function from that plugin?

One of my Wordpress themes requires a few third party plugins to run correctly. Most of the times I used to call functions from third party plugins using conditional statements like ...