Skip Navigation

[Resolved] WordPress Archives won't allow shortcode for Content Template

This support ticket is created 2 years, 7 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 5 replies, has 2 voices.

Last updated by Paul 2 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#2330221

Hi there,

In wordpress Archives, I can't include a content template. Although the shortcode is there, it shows nothing. I have to copy my code out of the CT and put directly in Archive view. Is this a bug? It's been this way for a long time and on multiple sites.

Views shortcodes however, work fine.

thanks

#2330261

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

Thank you for getting in touch.
Would you mind allowing me to have admin access to the website so that I can have a more detailed look at this for you ?

Please where applicable please provide me with a link to an example page where I can see the issue.

I've enabled the private fields for your next response.
Thanks,
Shane

#2330871

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

The content template in the archive is working. It's just that you've added no content to the templates.

If you check this page below all the way at the bottom, you will see the text "content template" which i've added to the content template for this archive.
hidden link

All 3 templates that I checked were empty.

Thanks,
Shane

#2330935

Sorry Shane, you misunderstood me...

In the Output editor putting:

[wpv-view name="banners" bannerlocation='[wpv-taxonomy-archive info="slug"]']

Works, whereas adding a:

[wpv-post-body view_template="page-element-page-intro"]

Does not. I have to enter raw code because it's not rendering the content template.

Or is it that you just can't add a CT shortcode in to archives?

Many thanks mate

#2331075

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

Based on what I see here in the output editor you cant have a content template here to load post data from the archive loop.

What I mean by this is that the output editor is designed to facilitate the structure of the archive and not the posts that it is listing out. Adding a content template here won't load any data because there isn't any post data being passed in the output editor.

Anything that requires that you display post data will need to be done inside the Loop editor or the content template for that loop editor.

I hope this clears up the issue for you.

Thanks,
Shane

#2332521

Great thanks for clarifying. I understand now.

My issue is resolved now. Thank you!