i want to hide ads for logged in user (subscribers). im using a plugin called “private” that generates shortcodes. i found the code i should use but dont know how to put it in my single.php. My single post is custom made so i cant use the rich editor. the one i want to use… [private role=”su…
Tag: wordpress
Google Calendar API PHP | GOOGLE_APPLICATION_CREDENTIALS: file xxx.json does not exist
I’m pretty new at this but I’ve been trying to use the google calendar API to show upcoming events on a website I’m making. So far I’ve enabled the API and created a service account to access the …
Set a custom shipping cost on every 10th Order in WooCommerce
WP 5.3.3 I need to change shipping cost programmatically, after order creation. This code doesn’t affect: add_action(‘woocommerce_new_order’, ‘custom_shipping_costs’, 1, 1); function …
Show all sub categories and parent on current category page in WordPress
I have this code snippet within my index.php to display all sub categories of the current category page: …
Creating a List of Available WooCommerce Coupon Codes and Display anywhere Using Shortcode
I am trying to generate a list of available coupons and to display them using a shortcode. I was hoping to generate the list using SQL and not “-1” since that’s heavier on the db from what I …
Remove WooCommerce Payment Gateways for defined groups of product categories
I’ve manged to get this code to work for removing ONE payment gateway based on one or more product categories. What I need help with is removing multiple payment gateways as well. In other words; it …
List custom post types with custom taxonomy category assigned to them
I have a custom post type called products and custom taxonomy called product-category. Now I need to list all the posts from this product post type which have product-category assigned to them. I thought something like this could work, but no luck. Could anyone point me in the right direction, please?! Really…
Automatically add a specific category and tags to a product when it goes out of stock after the order is placed [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question Hi I’m facing an issue regarding wordpress and WooCommerce I want to…
session_start() prevents saving in WordPress editor
I have the following code in my custom WordPress plugin: When I edit this in the WordPress editor it can be saved. However if I want to save again after more edits I get the following error: When I remove the line I am able to save again. I already Googled for quite a while now and some say that
Replace class from span tag HTML DOM
I am trying to replace and add some value in the HTML class… I am success in solving this issue to some extent but now I need help. Here is my function code this code currently output this modified Html Code And Now I Also want to replace the class of <span class=”page-numbers current”>…