I am using woocommerce on my wordpress site.
I am selling paintings. The products are paintings.
I have a list of artists as posts. Each artist is one post.
I would like to connect the posts and products so I can show the artist’s name on the painting page and the user can click on the name and it takes them to the artist post.
How do I do this?
Leave a Reply
You must be logged in to post a comment.
This is an example of how to add a custom field in WooCommerce product general tab. Since artists are posts ( category is not specified ), it will collect links for all posts and place them in a dropdown. The value of this field will be visible on the single product page below the price ( you can open the
content-single-product.php
file in WooCommerce theme, to see the actions for single product template, and functions attached, and change the priority of woocommerce_product_artist function if you want to change the place where the link will appear ).