Hello,
I am trying to figure out the best way to customize archive pages. ( hidden link )
I am able to customize product category archives perfectly when "display type: products" is selected
but when
"display type: subcategories" is selected I can can not customize the category archives using content templates.
I am now experimenting with code like:
add_action( 'woocommerce_before_shop_loop', 'bbloomer_custom_action_2', 1 );
function bbloomer_custom_action_2() {
echo render_view_template( 15678 );
}
But the problem i run into with this code is that I can not display "term fields"
for example:
Field: show-header
and "description" are not showing
I hope you understand... Can you help me with a solution?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Troy,
Thank you for contacting our support forum.
Just to understand, the content template displays fine in the area you put it correct ? Its just that the term custom fields aren't showing right ?
Can you let me know what is in this content template.
Hi Shane,
The content template is only showing when logged in and is not visible for guest. What am i doing wrong here?
I was trying to display "description field" only when "not empty" .. I could not get this to work so i made a workaround with the term meta field "show-header"
[wpv-conditional if="( NOT(empty($[types termmeta='show-header' output='raw'][/types])) )"]
<div id="content">[wpv-archive-description]</div>
<a id="show-more"></a>LEES MEER
[/wpv-conditional]
The content template is now showing. Must have been a cache issue.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Troy,
Thank you for the update.
Is everything ok with the site now ?
Thanks,
Shane