Skip Navigation

[Resolved] customize archive pages

This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by Shane 5 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#1203816

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?

#1204110

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.

#1210622

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]
#1211183

The content template is now showing. Must have been a cache issue.

#1211548

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