I want to add an extra query string to the src attribute’s value of the iframe element. I want to achieve this by using PHP or WordPress and not by JavaScript. The thing is that I want to use Youtube iFrame API, which is only possible if the iframe has a query string in which enablejspai=1 src=”https://www.youtube.com/embed/M7lc1UVf-VE?enablejsapi=1″ Currently, the user
Tag: wordpress
How to replace value in td using jquery/php? (wordpress)
I have a html code below (created using a plugin). I need to change colspan=”6″ to colspan=”4″. I tried jQuery below, but it doesn’t work… Would you please help me? Thank you. Answer With the selector [colspan=”6″] you can get to each and set a new attribute: Or, without jQuery:
WooCommerce custom localization address format for specific country
I am printing address labels from WooCommerce and find that the line breaks for the addresses are not as I need them. I found the code I need to change in woocommerce_localisation_address_formats hook and have added the line break but I do not know enough to add the correct code to the functions file thus avoiding going back to the
Get tag slugs from wp post that begin with specific letters then use them in a qp_query
I am trying to create a list of tags that I can use in an array within a wordpress wp_query. I’ve made the tags appear in the template (via echo) so I know I have the output, but I don’t know how to move/use the output from this into the array of the separate wp_query. I normally can find out
WordPress incorret password for username or email, added using “wp_insert_user”
So i have created my own user, using below code. I am more than certain that i have a correct password when i login. But for some reason that I dont know i always have “The password you entered for the email address/username is incorrect”. Can someone shed some light on me!!! P.S I confirm that my user exist. Wordpress
Converting Javascript data to PHP using ajax in wordpress plugin development
I’m building my first wordpress plugin and I’m having trouble converting a Javascript array of objects into PHP so I can use the data to create individual tables in the wp-admin user area. Before i actually include the object, i thought i’d try with just a single variable. Firstly, i included the wp-admin/admin-ajax.php url in wp_localize_script to use in my
How to change which choice in a Gravity Forms radio button field is selected using PHP as part of a gform_pre_submission
My PHP skills are not good but I learn by code example because I am not familiar with the syntax, but in this case I can not find a code example that works. I want to set a Product Option Radio Button Field’s selected value during a gform_pre_submission add_action based on another field’s value. I’ve tried something like this (there
Display an ACF field values in WooCommerce product archive loop
i’m currently playing around on localhost since i’m going to design an ecommerce for a client who owns a records store. I’ve installed Elementor, WooCommerce and ACF, and at first tried to use elementor custom skin to create a custom loop for my products, where i easily added the field i wanted with dynamic data. However, this turned out to
WooCommerce customizing product availability text with icons
In Woocommerce I want to edit the “in-stock text”, I found multiple answers on the internet, but for some reason, it doesn’t work for products that are in stock. It does work for products that are out of stock or are on backorder. I cannot understand what is different and why the in-stock is rendering differently than the other two.
How to check for an array of product Ids in WooCommerce
I am changing the text of the Add to cart button on shop pages in WooCommerce for specific products: If I have two or more IDs that need to have the same button text, how can I add an array of these ids into my function? Answer You can use in_array() PHP conditional function like: It should work. Also you