Custom single product page ā syntax to call on other WC sections?
-
Hi
In my quest to reject the bloat of page builders by no longer using them, Iām making some manual customizations to WooCommerce PHP theme pages instead.
Iām trying to keep the customizations confined to one file: content-single-product.php.
Iāve put the file in the appropriate file structure within my child theme. All good.
Iām using a combination of calling on native WordPress code, and also embedding ACF fields with PHP, inside my own HTML structures.
I know some code, but I donāt know PHP.
Iāve been searching all day, but I canāt for the life of me figure out how to do the most fundamental thing:
What is the syntax to simply call the following sections:
* Product Reviews
* Recommended Products, or Featured Products, etc.Looking at the first one, product reviews, I can clearly see which primary templates are involved with rendering product reviews (review.php and single-product-reviews.php).
But my issue is this: What is the exact code for calling the product reviews to display in my custom HTML div inside content-single-product.php? I have no idea, and was not able to find any help relating to this. I imagine it is super short and simple, but I just donāt know it.
I removed the product tabs (which usually houses the reviews) altogether, which is why I am adding the reviews separately as per my design, in my own custom HTML section. (The really odd thing to me is that when I view the template code for the Tabs, there is seemingly no reference to reviews at allā¦..so there was no hint to be found there).
I donāt want to do this in functions.php. I am happy to customize this one file, content-single-product.php, as it needs to be customized for many reasons.
So, what is the syntax for achieving what I need to? And can I use the same syntax anytime I need to call other sections in content-single-product.php that have their own php file (like product recommendations/related products, etc?
Iād greatly appreciate some assistance hereā¦
- The topic ‘Custom single product page ā syntax to call on other WC sections?’ is closed to new replies.