I am trying to create a function with two variables. One variable is the text I want to hover over, the other variable is the text I want displayed when I hover over the first text mentioned. I’m using the following shortcode from Shortcodes Ultimate to create this function: I have written the following…
Tag: wordpress
PHP: Check if current URL is part of defined URL
I want to check of the current URL is part of a pre-defined URL. For example: I want to check if the domain example.com/shop/ is part of the viewed URL. I’m using the following function to get the current URL and a pre-defined ($shop_page_url) URL: In this case it only works if the $shop_page_url is the…
Get WooCommerce specific product attribute terms sorted by “menu order”
I want to sort get_the_terms by menu_order of the curent product and till now i have this code: Answer There is 2 ways to get the product attribute term names sorted by menu order (for a defined product): 1). Using wp_get_post_terms() function (WordPress way) The WordPress function get_the_terms() doesn’…
Flaticons not showing up on WordPress
I have almost finished converting an HTML website over to WordPress but I couldn’t something to work. I am just creating a new theme to switch the website over. Here is the link to see what it should look like, There are three icons that are not showing up, right under the about section. And here is the…
Call to a member function get_items() on boolean in WooCommerce thankyou
I am trying to get order details to display a summary on my thank you page. The issue I am having is that this code snippet I have is breaking my wordpress. I have the stacktrace but I am unsure on how to fix it. The code to me looks correct so ensure why it’s not working. Does anybody have
Disable shipping methods having a specific word and based on a shipping class in WooCommerce
I’ve used a Business Bloomer snippet and tweaked it a bit to unset some shipping methods depending on a shipping class of items in the cart. It works fine with the 4 shipping methods I have tested with but in order to fully work on my website, I have to list all shipping methods values manually and I ha…
.htaccess redirect /subpage/ to /subpage?/wp-login
Trying to use .htaccess rule to do the wp-login JS check on first visit by appending ?/wp-login to the url since it’s interferring with Sucuri firewall when using password protection. I’ve created a test subdomain to try to get the htaccess redirect to work before using it on the live site: view h…
Hide table rows with jquery
In short I only want to show the table rows with a green ‘show’ button and I want to hide the other rows. screenshot 2screenshot 3 The problem is there’s a common class on the table rows because of a …
WooCommerce: get and echo “Order Total” on checkout page
I am trying to get the “Order Total” in a function with this code. But not working. The total is not printed at all. What am I missing here? add_action(‘…
Add a select field with time intervals based on opening, closing and breaks times in WooCommerce checkout
I am building pizza delivery website with WooCommerce. In fact when customer is checking out, he can select when he want to have food delivered. The select box should contain 15 minute intervals ranging from the current time and clearing all past hours. The first option I want is to be “As soon as possi…