Skip Navigation

[Resolved] Nested Shortcode – PostID

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

Problem:
The user would like to use the wpv-post-id as a shortcode attribute of the view shortcode:

[wpv-view name='my-view-name' ids=' [wpv-post-id] ']

Solution:
The shortcode needs to be registered in Toolset settings. In Toolset->Settings->Front-end Content->Third party shortcodes.

This support ticket is created 3 years, 10 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: Africa/Casablanca (GMT+01:00)

This topic contains 3 replies, has 2 voices.

Last updated by andrewB-18 3 years, 10 months ago.

Assisted by: Jamal.

Author
Posts
#2154041

Hello-
I am using this shortcode to access a view I have made.

[wpv-view name='my-view-name' ids=' [wpv-post-id] ']

Ids, is being used as a post ID variable. When I use [wpv-view name='my-view-name' ids='45154'], everything works fine. When I replace the ID with [wpv-post-id], it returns all posts and I see the '] in text on the page. What am I missing???

Thanks!

#2154237

Hello and thank you for contacting Toolset Support.

I believe that you need to register the wpv-post-id shortcode in Toolset->Settings->Front-end Content->Third party shortcodes. Even though the shortcode is from Toolset, but it needs to be registered so it can be used as nested shortcodes.

I hope this helps. Let me know if you have any further questions.

#2155395

Thanks for getting back to me.

The issue is with Elementor. You cannot nest shortcodes using their shortcode widget. Once I put it in a text field it worked just fine.

Additionally, I removed the third-party shortcode registration and it is still working.

I am all set, thank you!

#2155407

My issue is resolved now. Thank you!