Adding Product Author
-
URL: https://www.johnrothra.com/store/church-growth/1x-evangelism-kingdom-growth-strategy-local-church/
I’m wanting to add the name of the author(s) underneath the item description. However, what I’ve tried isn’t working. So here I post.
What I Tried
I added the custom fieldproduct_author
under the item’s custom field box, and entered the name of the author (me), clicked update under the new custom field just to be sure, then clicked to update the entire product listing.I then copied the
title.php
file from plugins/woocommerce/templates/single-product/ to theme_child/woocommerce/templates/single-product/. After this, I edited the copied file by adding an H3 under the title as so:<h1 itemprop="name" class="product_title entry-title"><?php the_title(); ?></h1> <h3 class="product_author"><?php echo get_post_meta($post->ID, 'product_author', TRUE); ?></h3>
I then cleared all caches and refreshed the page, but the author did not display. I tried altering where I put the copied file by placing it in the following locations, but none worked:
- theme_child/woocommerce/templates/
- theme_child/woocommerce
What did I do wrong or miss?
- The topic ‘Adding Product Author’ is closed to new replies.