I’m using the Petfinder API for WordPress plugin. The plugin defaults to listing animals based on how old the Petfinder entries are, from oldest to newest. I’m trying to figure out a way to either do newest to oldest, or alphabetize based on animal names. The data is loaded via the following code:…
Tag: wordpress
Blur a background image via css
<…
WordPress custom field for multiple pages
I am using ACF pro for creating custom field for my wordpress website. I have a custom field in home page which I want to use in another three pages. Code I have given below.
Ajax add to cart button for product variation in WooCommerce 3
I have this button here. The use of this button is to add to cart a product has a product id of 237, variation id of 208673, and attribute_pa_option of bluetooth. Is there a way to AJAX this?
Get the author ID of each product in Woocommerce cart
In woocommerce, I need get the user ID of each product within the cart, The user ID isn’t from the customer, but is the user who created and published the product that is currently in the shopping cart (the author post). I have this code that I got here: WooCommerce Get Order Product Details Before Paym…
Get the user email in Woocommerce “New account” email notification template
In Woocommerce I am trying to customize the “New account” email notification template changing the texts. Currently the default template shows the username but intead I want it to show the user email….
Round up cart total Woocommerce
I need to round up prices on my Woocommerce cart. It rounds up to 1. For example: If the total price of the cart is $40.85, I need the cart to show $41.00. I tried with this command but the price discount this 0.15 and I do not know how to do it. I found this in other sites but
WooCommerce product additional information shortcode
I am new to WooCommerce and am looking for a solution to display Product attributes on a post page. I’ve made research and some test but nothing seems to work. Ideally, I would like to use a …
WordPress pagination not working for get_posts() function?
I have make one Template and assign a template to testimonial page. All the below code is placed inside my template file. My problem is that Nextand Prev links are not even displaying on Testimonial page. I want to use only get_posts query to retrieve data. How can I display pagination for get_posts? Answer P…
Change product variation prices via a hook in WooCommerce 3.3
I´m using hooks for customizing variable product prices. However, this answer does not seem to be working for Woocommerce 3.3.5. I use following (from the previous post) on my functions.php file: …