trying to hide a “0” value from a HTML display

enter image description hereIs there any way to hide an HTML field based on the displayed value of "0" I have an ecomm site that displays Quantity available with a numeric value. I only want to display the number if it is above "0" The values are populated from data base upload to the site. The "0" value is NOT an input field. so most codes I see have the solution with some sort of input condition code.

My site displays this: Call for Availability.0 If item has QTY above "0" it displays this: Qty On Hand: 1708 I need to remove the "0" and only display Call for Availability.

I have researched similar request on this forum and found all have answers using an input field. The problem is the "0" is not an input. It is an code generated inventory amount.

I have tried CSS to hide the value, but that hides ALL the values including above "0".

I can insert any form of code needed. Java, PHP, json, etc…

Here is a sample of actual code I have:

<div id="availabilityInfo" class="availabilityInfo">  <span class="availability-header">[product_Header-availability]</span> <span id="availability" class="product_availability availability-item">[availability]</span>  <span style="display: inline;" id="product_inventory">[stock] <span class="freeshipping availability-item"><!--[freeshipping]--></span>  </span></div> 

The [STOCK] tag is what brings in the qty value of "0"

Hide products linked to a Membership while having that certain membership in Woocommerce

I have 2 Woocommerce Subscription Products called:

  • Bronze Membership (Monthly Subscription linked to a "Bronze Membership" in Woocommerce Memberships)
  • Silver Membership (Monthly Subscription linked to a "Silver Membership" in Woocommerce Memberships)

I can restrict products to these memberships with no problem, but in case of one customer purchase the Bronze Membership Subscription, when he goes to my store, he can’t see the Bronze Membership but he can see the Silver one., and if he has the Silver one, he can’t see the silver one but can see the bronze one in case he wants to downgrade his sub.

Isn’t there a way to hide the membership subscription product if the customer has an active membership?

Hide Past Events from Displaying – AIT Themes Events & Events Pro Plugin

I am using AIT Themes City Guide and trying to configure the Events list to make sense. The theme plugin does not age out old events. I assumed this would be the bare minimum a plugin claiming to be an Event manager would offer. However, it seems I have to make this happen myself. Before you suggest it, the theme developer is not likely to be helpful. Despite having a full license, they have no plans to add this simple feature.

So, I would like to code this myself and the code would have universal benefits. Essentially, events in this theme are "formatted posts". So, writing code to hide past events could be as simple as the code I found on this page:

How can I hide posts that are over 2 years old

Here is the code suggested:

add_action( 'pre_get_posts', 'filter_old_posts' ); function filter_old_posts($  query){     if( !is_admin() && $  query->is_main_query()){          add_filter('posts_where', $  callback = function( $  where = ''){              $  where .= " AND post_date > '" . date('Y-m-d', strtotime('-2 years')) . "'";               return $  where;          });          add_filter('getarchives_where', $  callback );     } } 

How can I modify the above to filter out posts older than the current date? How can I filter out just a single category?

Thank you!!

Hide Custom Taxonomy Editor for Specific Role(s) in WP Admin

I know you can select whether to hide or show various aspects of the custom taxonomy editor by passing arguments to the show_ui, meta_box_cb, or show_admin_column fields when registering. Something like:

register_taxonomy(     '',  //NAME OF CATEGORY     '', // NAME OF CUSTOM POST TYPE     array(         'show_ui' => true,         'meta_box_cb' => false,         'show_admin_column' => true     ) ); 

What I am wondering is how can I add a hook/filter beyond this so I check for the role of the current user and then set whether those arguments are true/false depending on the role?

I am here, but stuck:

add_action('in_admin_header', 'restrictTaxonomyEditBy'); function restrictTaxonomyEditBy() {     $  screen = get_current_screen();     $  user = get_current_user_id();     global $  post;         if(!current_user_can('administrator')) {         //ADJUST TAXONOMY PROPERTIES HERE TO HIDE/SHOW ADMIN UI     } } 

Can you hide a server IP address using Cloudflare?

I am in the UK and looking for a new server for my websites. Pricing in the UK is really expensive but I stuck with the UK as that is where my main audience is. I noticed that with providers like Hetzner in Germany I can get a better server and 1/2 the price.

Can I host the websites in Germany but still do well in search engine rankings in the UK? It has been suggested that using Cloudflare will ultimately hide the true server location and the search engines then base the best location on website characteristics such as language, topic and the like.

How do Shadowdancer’s Hide in Plain Sight, Hellcat Stealth, and enemies’ darkvision interact?

I recently had a game where there was some uncertainty, so I’m here to ask you how this interaction works.

I have a character, a Shadowdancer. This character has also got the Hellcat Stealth feat. The character sneaks in pure darkness, no light at all, on an enemy with Darkvision. There is no cover. Does the character stealth with Hide in Plain Sight, Hellcat Stealth, or the character cannot attempt to stealth? Or does the character stealth with Hide in Plain Sight but with a penalty similar to Hellcat Stealth?

Taxonomy hide not working

I am trying to exclude a single term from my resource pages archive page. I have created a custom post type ‘resources’ and within that a custom taxonomy called additional_category. Within that I am tagging the post as gated or LEAP. I would like to hide the gated term from displaying on the archive page. I have the following code, but its not working as expected. Can anyone tell me where Im going wrong?

   $  some_args = array(                     'post_type'        => 'resources',                     'posts_per_page'   => -1,                     'tax_query' => array(                         array(                             'taxonomy' => 'additional_category',                             'terms' => 'gated',                             'field' => 'slug',                             'include_children' => false,                             'operator' => 'NOT IN'                         )                     ),                 );                      $  s = new WP_Query( $  some_args );                      while ( have_posts() ) :                     the_post();                          /*                      * Include the Post-Type-specific template for the content.                      * If you want to override th  is in a child theme, then include a file                  * called content-___.php (where ___ is the Post Type name) and that will be used instead.                  */                 get_template_part( 'modules/u3gm-content', get_post_type() );              endwhile;         ?> 

One of my players want to carry his familiar on his body and says it should not be targeted by enemies because it can hide on his body?

One of my players (of a rogue) said that he heard of DM’s allowing the familiar to be carried on the players body. He use his familiar to help him in combat and get advantage on the attack roll.

I said it’s okay for me and allowed it. But later in fight I played a goblin and obviously attacked his familiar in his pocket, to take his advantage away. He said that it shouldn’t be possibly because his familiar hides in a pocket and can’t be targeted. I didn’t allow that because it would obviously break the game. He said that many DM’s bend the rule like this and allow this.

I would like to hear whether anyone has ever allowed this change of the rules, and whether it did or will break the game.