I am create a custom widget in WordPress and in the widget I try to create a select field with for loop and shows in it 10 numbers from 1 to 10. I created BUT underneath number 10 it have an empty …
Tag: wordpress
Reading JSON Link from WordPress into a Table [closed]
I have a problem to construct my data into a table since currently each row i have is creating a new table. I am using the JSON Content Importer and below is the code i have:
WordPress – Filtering Custom Post Type by multiple Custom Taxonomies on front end
I’m trying to allow users to select criteria from multiple custom taxonomies in order to filter a custom post type on the front end via a from with multiple selects. My problem is that the code only works if each of the selects has criteria selected. Trying to find a way where users can also just select…
How do I use tax_query and meta_query together?
I’ve got a custom post type called ‘jobs’ with a taxonomy called ‘job-status’. I’m trying to display a list of jobs with a certain tax term (job-complete) that haven’t got a report uploaded to them in …
Add custom field inside a do_shortcode
I’m trying to add a contact form into a page template with contact form 7. However, I want the destination email to come in from a custom field I have created. The code that pulls the custom field …
Remove product after an order has been placed in WooCommerce
I’m using the most recent versions of WordPress and WooCommerce. I’m aware this might seem weird out of context, but I wanna add a hook to my functions.php that removes a certain product by ID from an order after the order has been placed. Here is what I am working with so far: I am trying to remo…
How to set product brand when programatically importing WooCommerce product?
I am working on a script to import products from a plain text file that is provided to me by a 3rd party. I have successfuly imported the products by using WC_Product object, for instance: //new …
How to use WooCommerce Membership hook
I’m working on a website using WooCommerce membership. I’m using a hook called wc_memberships_user_membership_saved, What I want is to display a recap of my order. I read this documentation: https://docs.woocommerce.com/document/woocommerce-memberships-admin-hook-reference/#wc_memberships_user_mem…
Pagination of results of wp_list_pages [closed]
I’m displaying the child pages of a page with this code:
”, ‘child_of’ …
List categories and highlight current category archive page
I need to display buttons for all post categories. When I click on a button, it links to the archive page of that specific category. Is there a way to highlight the current category? My code <div&…