Apologies if I use some of the wrong terminology in my question. I am self-taught and still learning. The code below is part of a form template. I would like to add some additional attributes to the …
Tag: wordpress
ACF wordpress Modulo variable
I have some code. Trying to add ACF filed(number) instead static number So when I save this I have error like Fatal error: Uncaught DivisionByZeroError: Modulo by zero When I change <?php $fff = the_field(‘show_ad_every_x_posts’, ‘option’); ?> to <?php $fff = 7; ?> It works…
Issue with WooCommerce WC_Product set_category_ids() method in ACF “acf/save_post” hook
I have a problem assigning a product category to a Woocommerce product that I create with Php. (Environment is WordPress 5.6.1, Woocommerce 5.0, Php 7.4.14, ACF Pro 5.9.5, Oxygen 3.6.1) All other attributes for the product gets saved while creating it, and I can see that the product object get updated with th…
Get only one product category term for a WooCommerce product
I have a mystery with the categories from WooCommerce. For different products I have multiple categories. For example the product Nike Air Red I connect this product with two categories Brands->Nike and Shoes->Red Brands and Shoes are main categories and Nike and Red are subcategories. On the product pa…
Display related products using a shortcode on WooCommerce My account Dashboard
I’m trying to display related products in My account Dashboard page. I followed this WooCommerce Shortcodes documentation. I tried to use the following code: This does not display the related products. But when I try to display products in specific category like following, it works: Kindly any help to r…
Save WooCommerce order total volume as a custom field for Shipstation
I’ve been coding a WP plugin for Calculating the square inch total volume for an order and send it via custom field to Shipstation: I uploaded it via SFTP to the sites files and it shows up on WP but when I click activate I get a fatal error: Fatal error: Uncaught Error: Call to a member function get_ca…
DNI show div based on landing page, continue showing div entire session
I have about 60 landing pages that use different phone numbers on them. I am using a combination of WordPress and Advanced Custom Fields to place the phone numbers on their respective pages. I am being asked to show a <div> based on the landing page URL that will not only show the phone number assigned …
Displaying a dropdown menu of custom post titles with ACF (Advanced Custom Fields) in WordPress
I would like to display a list of custom post titles with the help of Advanced Custom Fields. First off, I have created a custom post type. Then I have created a few “posts” inside this custom post type ie. Room 01, Room 02, etc. Next, I have created a new Custom Field for each room and set the Lo…
Ajax click function is not working in WordPress functions
I would appreciate some help. I am trying to create a save bookmark plugin through wordpress functions file (all code in one place). The problem is I am unable get the ajax, jquery to work I am not sure what part of it is not working. You click on link and it’ll call ajax and then php where it’ll …
Add text after shipping method label in woocommerce_package_rates hook
I have multiple shipping options on my page and wanted to put the label “free” next to them when the customer buys goods for more then 2500 czech crowns. I’m using Set all shipping methods costs to zero based on cart items subtotal in WooCommerce answer code which makes the shipping methods …