Skip Navigation

[Resolved] Using Divi Library Items in CPT breaks wpv-post-title in archive loop

This thread is resolved. Here is a description of the problem and solution.

Problem: I am using a Divi global module from my Library in the contents of a custom post. I also have a WordPress Archive for this post type where the Content Template for the Loop is designed with Divi Builder. I have inserted the wpv-post-body shortcode in the loop, followed by another shortcode wpv-post-title. Any shortcode after the wpv-post-body shortcode will display information from the wrong post on the archive.

Solution: Divi global modules seem to cause problems with post context, so you should add an explicit post ID attribute to any Toolset shortcodes that follow the wpv-post-body shortcode.

This support ticket is created 5 years, 6 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by carmineM 5 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#1211536
client-portfolios.png

I am trying to:
build cpt single using a divi library item. Then, build an archive for the cpt.

Link to a page where the issue can be seen:
hidden link

I expected to see:
An archive that included

 {!{wpv-post-body view_template="None"}!} 

and

 {!{wpv-post-title}!} 

Instead, I got:
Post body displays fine however the wpv post title of the first cpt is repeated for each post.

More detailed explanation:
Divi uses items called 'modules' to build content. Example modules are 'Text', 'Slider', 'Gallery', etc.

A module can be saved as a 'Library Item'. Global Library Items can be used repeatedly in posts (with unique content for each post). However changing parameters in the Global Library Item will update every instance it has been placed in a post. It's a way to have style consistency.

The issues of 'repeated post title' ONLY occurs when a Library Item is used in the post. If a standard Divi module is used the issue does not occur.

The attached image demonstrates...

1) these first three posts use the Divi Gallery Module. See the Post Title (repeated three times in each item, for testing) all work as expected.

2) the fourth post uses a Divi Library Item (which also contains a Divi Gallery Module). See the Post Title is a repeat of the first posts Title. Even the Post Title Link is linked to the first posts' single page. If more posts were created using the Library Item the title of the first post in the list would be repeated for them as well.

Also note that on this page... hidden link
building the exact same scenario using a different CPT Builder (CPT UI) and Divi Layout Injector plugins, the Library Items work fine.

Question to resolve: Can you assist in figuring out why ToolSet Archives can't display Post Title if the Post was built using a Divi Library Item.

PS: while I wait for your reply I'm going to create a custom field called client name and see if that field will display correctly.

I'm standing by.

With best regards,

-Carmine

#1211549

Hi, I have seen some issues with global modules in the past, but not this specific one. In my local tests, adding an explicit post ID attribute to the shortcode seems to fix the issue. Try this notation in your Divi Builder template:

{!{wpv-post-link id="{!{wpv-post-id}!}"}!}
#1211573

My issue is resolved now. Thank you!

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