-
AuthorPosts
-
July 21, 2014 at 3:48 pm #293890
Hi everyone,
on single product pages the sidebar is on the left side. I was happy to find the code to get it on the right side:
http://kriesi.at/documentation/enfold/change-woocommerce-single-product-page-layout/It worked well except that the sidebar is a bit smaller than the normal one. It looks like that:
http://erfolgswelt24.com/auf-einen-blick/marketing-werkstatt-no-1-marketing-konzeption/
As you can see the text within “product search” is being cropped. Is there a way to get the sidebar bigger or can I change the words within the product seach (Suche nach Produkten). I didn’t find a possibility to change.
Also the rating field is not correct. Without sidebar, the checking field is above the name and with sidebar it’s getting worse.
Thanks, Sophie
July 21, 2014 at 9:03 pm #294028Hey Sophieja23!
Please change the code you have posted from documentation to following one
# # wrap single product image in an extra div # add_action( 'woocommerce_before_single_product_summary', 'avia_add_image_div', 2); add_action( 'woocommerce_before_single_product_summary', 'avia_close_image_div', 20); function avia_add_image_div() { echo "<div class='four units single-product-main-image alpha'>"; } function avia_close_image_div() { global $avia_config; $avia_config['currently_viewing'] = "shop_single"; echo "</div>"; } # # wrap single product summary in an extra div # add_action( 'woocommerce_before_single_product_summary', 'avia_add_summary_div', 25); add_action( 'woocommerce_after_single_product_summary', 'avia_close_summary_div', 3); function avia_add_summary_div() { echo "<div class='four units single-product-summary'>"; } function avia_close_summary_div() { echo "</div>"; //close out the summary echo "<div class='four units single-product-sidebar'>"; get_sidebar(); echo "</div>"; }
Regards,
YigitJuly 21, 2014 at 9:07 pm #294029Hi!
Code i posted above will make product image, product summary and sidebar div’s equal in width. Please also add following code to Quick CSS in Enfold theme options under General Styling tab
#top #review_form #respond .comment-form-rating, #commentform label { position: initial; }
Best regards,
YigitJuly 22, 2014 at 11:17 am #294270It works now, thank you :)
- This reply was modified 10 years, 5 months ago by Sophieja23.
July 22, 2014 at 1:12 pm #294297 -
AuthorPosts
- The topic ‘Sidebar on single product page’ is closed to new replies.