-
-
I am trying to display related 4 products in one line, the code in functions-woocommerce.php seem to be correct by default even though I cannot see how this could give me 2 columns if set to 1?
woocommerce_related_products(array( ‘posts_per_page’ => 4 ),1); // Display 4 products in rows of 2
-
Hello,
Please go to file wp-content\plugins\woocommerce\includes\wc-template-functions.php and find this function:
function woocommerce_cross_sell_display( $posts_per_page = 2, $columns = 2, $orderby = 'rand' )
edit post per page and columns value from 2 to 4. Save changes and refresh cart page.Let us know.
Best regards!
-
-
1 more thing, for some reason the sticky navigation does not appear either
-
Hello,
–Woocommenrce:
Yes, indeed will be overwritten in case of a plugin update. So it is recommended that you keep a copy of the edited file as backup. Since it is a file directly at the plugin folder and not overwritten/customized by theme. Sorry but as mentioned, this is not one of the woocommerce files inside theme folder. We can not do anything about them as they are created by another author.
I tried login in but the username is not valid. Can you please double check?–Footer menu:
If you see here: https://postimg.org/image/8k4fpia68r/ The copyright is indeed in the center of the section. But the menu has further padding that is pushing it at the right. So the custom css should target the menu directly. Try adding this code into your custom css box:#copyright .copyright_text ul.footer { margin-left: -45px !important; }
Change the value to your wish.
–Sticky nav:
Did you set it on at Header Options > Sticky Nav? The type of header you have chosen keeps only the logo in the sticky nav. Not the menu. This is the header’s default style. If you do not like it, you can chose another style or customize it yourself. Please know that personal preference customization is not included in support.
Let us know.Best regards!
-
-
Hello,
In the same file wp-content\plugins\woocommerce\includes\wc-template-functions.php in this section:
function woocommerce_output_related_products() { $args = array( 'posts_per_page' => 2, 'columns' => 2, 'orderby' => 'rand', ); woocommerce_related_products( apply_filters('woocommerce_output_related_products_args', $args ) ); } }
I edited out the value ‘2’ to ‘4’. Please check your products. The relted products are showing in 4 columns.
Best regards!
-
-
You must be logged in to reply to this topic.