0
votes
1answer
33 views

How to add a filter conditionally based on page related Conditional Tags

I am developing a WordPress plugin and can't conditionally add filters based on the conditional tags. This is my code: add_Action('init', 'determine_location'); function determine_location() { $d = ...
0
votes
1answer
15 views

Using conditional staements to load plugins

I'm having some conflicts I think with a couple of plugins I have written that use ajax. As they load their resources on every page rather then just when needed I think it's causing problems. What's ...
0
votes
0answers
28 views

Multiple Plugins Interacting with Menu

Got an issue with the use of multiple plugins interacting with the menu system in WordPress. We are using UberMenu and wanted to use If Menu as well to control the visibility of some of the menu ...
0
votes
2answers
199 views

Checking if a woocommerce attribute is set

I'm trying to figure out how I can check if a custom attribute is set in woocommerce on a product. As It generates an error if that particular attribute isn't set. Here is my code that pulls in the ...
0
votes
1answer
84 views

conditional tags for the output of a plugin

I'm still quite a newbie developer so small problems like this bring me to a stand still from time to time. I've basically built a custom plugin to display pdf images next to a link very basic I ...
1
vote
2answers
605 views

Conditional tag in Widget Logic for checking if top level page or if subpage

I'm using the Widget Logic plugin to show widgets on certain pages using Wordpress Conditional Tags (or any general PHP code). What I would like to do is only show a widget on child pages, not top ...
0
votes
1answer
1k views

Woocommerce getting top level category parent and make all sub categories have the same template and menu

I want to get the top level category parent which is "wedgwood" so i give it a different menu and different template that what i wrote so far but it dont apply except on ‘wedgwood’ category wegdwood ...
0
votes
1answer
180 views

Trying to place shortcode/css/html into an IF conditional statement

With the WooCommerce plugin, I'm trying to get a different template/look to apply to the individual product page depending on what category the product is in. In other words, I want a product within ...
0
votes
1answer
266 views

do add_action on condition

This snippet for example will email on EVERY post: function email_friends( $post_ID ) { $friends = 'bob@example.org, susie@example.org'; wp_mail( $friends, "sally's blog updated", 'I just put ...
5
votes
4answers
1k 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 ...