Home › Forums › General Issues › Product Category extra description › Reply To: Product Category extra description
Hi @websteem
Looking at your video, it seems you’re using a child theme (Handmade Child Theme) but then update Handmade: functions.php not Handmade Child Theme: functions.php
So that could be the first issue.
Try adding the code there instead. If it still doesn’t work, switch to the default twenty-twentyone theme and add the below to functions.php:
add_action( 'woocommerce_after_main_content', 'my_extra_description' );
function my_extra_description() {
global $wp_query;
# get the query object
$category = $wp_query->get_queried_object();
#get the cat ID
$category_ID = $category->term_id;
echo '<p>Can we see this? Is '.$category_ID.' the right ID for this category?</p>'; #remove after debug
#get the field
$contenu_categorie = get_field( 'contenu_categorie', 'category_'.$category_ID );
#if we have data, show it
if( $contenu_categorie ){
echo $contenu_categorie;
}
}
At the very least, when you go to your shop category page, it should show ‘Can we see this? Is…’
Then perhaps you have an issue with your theme!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.