Category : wordpress

I am using code that displays the Related Products tab on a single product page. // Display a multiselect field in "Linked Products" section add_action( ‘woocommerce_product_options_related’, ‘display_handles_product_field’ ); function display_handles_product_field() { global $product_object, $post; ?> <h2><strong>Related products in tabs</strong></h2> <p class="form-field"> <label for="handles_product"><?php _e( ‘Related products’, ‘woocommerce’ ); ?></label> <select class="wc-product-search" multiple="multiple" id="handles_product_ids" name="_handles_product_ids[]" data-placeholder="<?php ..

Read more

I’m working on a site that lets a user enter data from a form and have it attached to a product. I was originally using: $cart_item_data [‘Entry Link’] = $formUrl; $woocommerce->cart->add_to_cart($productID,$quantity,0,$cart_item_data); With $formUrl being a link to the form data. Whenever a user made an order, under the product would be ‘Entry Link’ with the ..

Read more

I am using wp_login_form() and I have a situation that I need to redirect to a specific page after a successful login. Code <?php $log_args = array( ‘redirect’ => ”, ‘form_id’ => ‘loginform-custom’, ‘label_username’ => __( ‘Email’ ), ‘label_password’ => __( ‘Password’ ), ‘label_remember’ => __( ‘Remember Me’ ), ‘label_log_in’ => __( ‘Log In’ ), ..

Read more

I have created a custom page template in WordPress and assigned it to a page, i have also included the WordPress header in the template with "<php get_header(); ?>". However the custom page template has it’s own header which means i now have two headers like this: <head> …..Header content from WordPress… </head> <head> ….header ..

Read more

I have been trying for a while to translate strings(%s message, %s messages), but it is not possible to do it with PO editor, Loco translate, etc. because it just corrupts output, and the counter is not working properly. So I found where that code is placed. By editing it manually I could see the ..

Read more