Skip Navigation

[Resolved] Shortcode not working in regular pages

This support ticket is created 5 years, 3 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)

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by jelle-jacobd 5 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#1308237

Tell us what you are trying to do?
I'm trying to use the following shortcode in a regular page. But is not working. It only short a part of the shortcode. Within a Toolset view or content template it works just fine. Should I modify the shortcode? It is probably related to the [wpv-post-id] part?

[product_table include="[wpv-post-id]" variantions="separate" columns="sku,att:length,att:color"]

#1308265

Shane
Supporter

Languages: English (English )

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

Hi Jelle,

Thank you for contacting our support forum.

Does your shortcode work when you manually provide an ID for it instead of using the [wpv-post-id] shortcode.

Please let me know.

Thanks,
Shane

#1308307

Hi Shane,

Thanks. Yes it does work with manually id.

#1308315

Shane
Supporter

Languages: English (English )

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

Hi Jelle,

So the problem could be that the custom shortcode product_table doesn't accept the [wpv-post-id] as a parameter.

Not sure why it works in a content template or view as you say. If the [wpv-post-id] shortcode renders on the same page that you are using the product_table shortcode then it could be an issue with the shortcode rendering custom shortcodes as a parameter.

Also remember that the [wpv-post-id] is going to get the ID of the current page that it's on. So if the id provided doesn't have any data for the product table shortcode to render then nothing will be displayed.

Thanks,
Shane

#1308547

Hi Shane,

Thanks. That's correct. Ik works in a view or Toolset page template. But not on my theme page block or page template builder. I'm not sure if this is correct behaviour and if yes, it looks like a lack of theme support. Toolset does support the products table, so maybe that's why it is working with a view or page template and my Theme isn't directly without Toolset.

This is the plugin I'm using as recommended: https://toolset.com/2017/06/wordpress-table-plugins-integration-with-toolset-types

Anyway, I managed to get the table display working. But it takes a view in order to get things working. In my opinion it should work directly from my theme page block. I'm using Zephyr by Upsolution.

I would really love complete Toolset theme support for Zephyr/Impreza by Upsolution. Is it possible to arrange that in any way?

#1309621

Shane
Supporter

Languages: English (English )

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

Hi Jelle,

Happy to see you were able to come to a solution.

The problem is that we don't know where exactly it is breaking on the theme. Given that it works fine in Toolset then it would work well as a suitable fix to this.

I would really love complete Toolset theme support for Zephyr/Impreza by Upsolution. Is it possible to arrange that in any way?

The problem with this is there isn't a direct conflict between Toolset and the Zephyr theme but rather with the Product Table shortcode.

However It could also be a case where toolset has made special provisions to support shortcodes within shortcodes especially after the changes to the wordpress shortcodes API which see some cases of Shortcodes being used as parameters for attributes don't work anymore.

Thanks,
Shane

#1311723

Hi Shane,

Thanks, makes completely sense. I'll leave it with this and leave the view in place. It works so why change it. I tried to understand why and now I know. Although I would support full Toolset support for the theme mentioned.

My issue is resolved now. Thank you!