Skip Navigation

[Resolved] Problems with third party plugin rendering (Glossary Plugin)

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

Problem: The wpv-post-title tag is showing the title of the page where the View is shown instead of the title of the post in the loop. The View includes a post ID filter using the shortcode attribute "ids".

Solution: Try adding the ID attribute to specify the title target.

[wpv-post-title id="[wpv-attribute name='ids']"]

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/

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

Last updated by Helmi 6 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#1188982

I am trying to:

Show the results of a view without displaying glossary tooltips.

We use a premium plugin called glossary from codeat to show tooltips to some special terms to help WordPress beginners to understand our articles:

https://wordpress.org/plugins/glossary-by-codeat/
hidden link

You can see the tooltips i.e. at the first paragraph of this article with the terms "Themes" and "Child Theme":

hidden link

I made a view called "Produktbox View" that shows some information about WordPress plugins, themes or services. The view is filtered by shortcode attributes ids. I only define one id of the CPT "Produkt" per view Shortcode:

[wpv-view name="produktbox-view" ids="2294"]

This is the loop:

<div class="produktbox">
  <div class="produkttitel"><strong><a rel="noopener" target="_blank" rel="nofollow" href="[types field='homepage' output='raw'][/types]">[wpv-post-title]</a></strong>: [types field='kurzbeschreibung'][/types]</div>
  <div class="produktboxbild"><a rel="noopener" target="_blank" rel="nofollow" href="[types field='homepage' output='raw'][/types]">[wpv-post-featured-image size="medium"]</a></div>
  <div class="produktkurzbeschreibung">[wpv-post-excerpt output="raw"]</div>
  [wpv-conditional if="( $(wpcf-hubpage) ne '' )"]<div class="infopagelink"><a href="[types field='hubpage' output='raw'][/types]">[wpv-post-title] Infos</a></div>[/wpv-conditional]
  [wpv-conditional if="( $(wpcf-hubpage) eq '' ) AND ( $(wpcf-testpage) ne '' )"]<div class="infopagelink"><a href="[types field='testpage' output='raw'][/types]">[wpv-post-title] Test</a></div>[/wpv-conditional]
[wpv-view name="aktuelles-angebot-eines-produktes-produktbox"]</div>

This works fine, but if the Glossary plugin is active the first appearance of this view on the page has an error. The display of the second...

[wpv-post-title]

... in the view shows the title of the page where the view is shown, instead of the title of the actual Produkt CPT in the loop.

This is strange because the first occourance of the wpv-post-title on the tops works correctly. Also this error occours only the first time the view is integrated in the page. All following views show up correct.

This error dissapears if I integrate any other view above the produktbox-view.

It also disappears if I deaktivate the Glossary plugin for this page.

Link to a page where the issue can be seen:

hidden link

I expected to see:

The second produktbox-view shows information about the Astra Theme and the wpv-post-title under the image shows up as expected as "Astra Theme" + "Test".

Instead, I got:

The first produktbox-view shows information about the Divi Theme and the wpv-post-title under the image shows up as "Produktbox Testseite (ohne Beaver)" (this is the titel of the page) + "Test".

I already tried to stop the glossary plugin from rendering the view content with the help of the shortcodes:

[glossary-ignore]This text should not be rendert by the glossary plugin![/glossary-ignore]

This works with "normal" content. I already tested that.

But this does only work partially with my view but never for the whole view. I placed the shortcodes at the beginning and the end of the loop item, before and after the shortcode for the view and around every single line in the view. It works for some parts of the view i.e. for the first line.

But this is not my main problem. If I use following tags in the view:

[wpv-post-body view_template="None"]

or

[wpv-post-excerpt output="raw"]

or

[wpv-post-excerpt length="100" more="weiter"]

The following output of wpv-post-title is wrong.

It works if I use

[wpv-post-body view_template="None" suppress_filters="true"]

... but I only want the excerpt to be shown and the following code doesn't work:

[wpv-post-excerpt output="raw"  suppress_filters="true"]

I know that you can't help when the problem is caused by the third party plugin, but I can't figure out if this is the case and how the rendering of the content is controlled.

I also informed the creator of the glossary plugin.

#1189232

Hi, could you try the following test? You can access the "ids" attribute from the View shortcode inside the loop, using the wpv-attribute shortcode. I'd like to see if specifying the post ID this way will resolve the problem:

Title test: [wpv-post-title id="[wpv-attribute name='ids']"]

Please place this code in the spot where the title of the current page is displayed instead of the current post in the loop. Let me know the results.

#1189260

This resolves the problem with the wrong title display! Great!

I still wonder if there is a way to get a display of wpv-post-excerpt like

[wpv-post-body view_template="None" suppress_filters="true"]

... that doesn't get rendered by the glossary plugin?

#1189700

I'm not really clear what the problem is with the excerpt, can you explain in more detail? There is no "suppress_filters" attribute for this shortcode: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-excerpt

If another plugin is filtering the excerpt, you may need a custom code-based solution that gets the excerpt directly from the posts table in the database, bypassing that filter.

#1191980

My issue is resolved now and I will try the custom code solution!

Thank You!