Skip Navigation

[Resolved] Content Template not appearing above Archive Loop

This support ticket is created 3 years, 9 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by alexG-4 3 years, 8 months ago.

Assisted by: Waqar.

Author
Posts
#1643561

I'm trying to display a content template above the Archive Loop using the block editor. The content appears in the preview within the editor, but it does not appear on the page itself.

Please see this video:
hidden link

I've deactivated all plugins (including the remaining two shown in the video). And the same behaviour happens with the 2020 Theme.

Thanks

#1646043

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Alex,

Thanks for asking! I'd be happy to help.

This issue is already highlighted and when a content template is used outside the loop of a WordPress Archive, no current post/page scope is available due to which content template fails to render.
( ref: https://toolset.com/errata/content-template-is-not-rendered-if-added-outside-the-archive-loop-of-a-view/ )

A fix for this is planned to be released in Views version 3.3 and for now, a workaround can be to include any post/page ID through the "item" attribute.

Example:


[wpv-post-body view_template="slug-of-content-template" item="2"]

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1646639

Thanks, Waqar

My searches didn't find that reference to the problem. But on the other hand, the "workaround" proposed there didn't mention your suggestion - which works perfectly.

Thanks.

Alex

#1646641

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.