I’m developing a WP plugin and have a WordPress URL: (e.g.: http://localhost/testsite1/coder/?id=66), and have attempted to add a rewrite rule to http://localhost/testsite1/coder/66/ using the following rule: I have registered a WP Query Var using: but when at URL http://localhost/testsite1/coder/66/, when I run code echo get_query_var(‘id’); nothing is displayed however when at URL http://localhost/testsite1/coder/?id=66 the echo statement will display 66. What
Tag: wordpress
Woocommerce conditionally load a custom product template
I am creating a custom theme and I have copied the file content-product.php to my theme folder. There I have made changes to the html structure and css. I can load of list of products and see the changes working via the short code [products]. However elsewhere on the site I want to display another list of products but from
Javascript and WordPress Uncaught SyntaxError using wp_enqueue_script on single product page of woocommerce
I’m no good at javascript but I think this code is right because it is just copy and paste from Zopim website and it was working before I tried to use their widget in a different approach. functions.php I am having another issue with the code above. I can’t get the script file to load on products page. It only
Javascript click event doe not work on wordpress
I need to call a function by clicking on some elements. I have tried several ways but it seems that it does not want to fire. the element in question is generated by the “quiz master and survey” plugin on wordpress. Anyone have any idea what the problem might be? Thanks in advance! OR OR Screenshot of Dom: Answer querySelectorAll
Add php code after product price on shop and archive pages [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 4 months ago. Improve this question Link attached image I am trying to add code php after price (not on single product pages) but on sshop
Multiple IDs rule in php code WooCommerce
I’m simply trying to make this php code work with multiple IDs Trying this doesn’t work – What’s the correct formatting? Answer Try this. Learn about in_array here : https://www.w3schools.com/php/func_array_in_array.asp Keep adding items in $ids as required.
Calculate and update product price in cart – WooCommerce
I’m creating a WooCommerce (Version 5.6.0) site where users can buy foam products and the prices are calculated on the archive page. Basically, the users enter the dimensions and the price is calculated based on a formula. I’m currently struggling with updating the prices in cart, I don’t have previous experience in customizing the products and prices at this level,
wow.js and animate.css doesn’t work on wordpress theme
I added wow.min.js and initializing the WOW on the end of the body and animate.css on the header. But after adding the classes to elements, animation doesn’t appear. I tried adding the CSS and js file via function.php but that didn’t work too. body: header: Answer After spending 2 days on the issue, I’ve found out that I should add
css in the menu does not work because the id is pushed into the wrong container
i want to use this code in wordpress. The first code shows the working code. The second code shows how it is displayed in Wordpress when I use this position <?php wp_nav_menu (array (‘menu_id’ => ‘main-nav’,)); ?> it is packed in the ul but it has to be represented as above around the code in the surrounding container. Code Code
Move “review tab” to position output of product sharing on WooCommerce single product page
I want to change the position of the “review tab” to the position below the share button on the right I removed the default “review tab” with this code and it worked But I don’t know how to re-add the “review tab” under the share button. Any advice? Answer To change the position of the “review tab” to the position