How to make menu country specific?

Is there a way to tell which country you are in when viewing the site? I mean like is the domain name example.uk | example.ca | example.com/en … That kinda thing? Then you could search your domain for the string for that country: $protocol = stripos($_SERVER[‘SERVER_PROTOCOL’],’https’) === true ? ‘https://’ : ‘http://’; $url = $protocol … Read more

How to save multiple custom user profile fields using repeater JQuery

Add square brackets to input names to get PHP to interpret them as an array of data instead of overriding the value with each new input. so your input will look like this: <input type=”text” name=”skills[]” id=”skills” value=”<?php echo esc_attr( get_the_author_meta( ‘skills’, $current_user->ID ) ); ?>” class=”textbox” /> <input type=”text” name=”skills_percent[]” id=”skills_percent” value=”<?php echo esc_attr( … Read more

How to display custom fields as table in Woocommerce

How are the custom fields saved? If you use ACF – Advanced custom fields, you can use get_field() function to get the variables. This should get you started. You can use another action hook or priority if you want the table to be displayed somewhere else. function display_product_table(){ global $product; ?> <table class=”shop_attributes”> <tr> <th><?php … Read more