Skip Navigation

[Closed] Custom shortcode in the Toolset View is breaking the View output

This support ticket is created 4 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.

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 4 years, 10 months ago.

Author
Posts
#1835307

Tell us what you are trying to do?
I am trying to embed a custom shortcode within a Toolset view. The problem is, my custom shortcode is getting exceuted regardless of it's placement within the view output. This is breaking my view output as my results are appearing before any custom search control(search bar, sorting, pagination).

Is there any documentation that you are following?
This is the link I took reference from: https://toolset.com/documentation/adding-custom-code/how-to-create-a-custom-shortcode/#:~:text=To%20do%20this%2C%20go%20to,Third%2Dparty%20shortcode%20arguments%20section.

Is there a similar example that we can see?
I am fraid not as the website works on intranet only.

What is the link to your site?
N/A

#1835357

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

I suspect your custom shortcode is echoing content, instead of returning it, so the output appears out of sequence. That's what your symptoms sound like.

Shortcodes should always return their content: https://developer.wordpress.org/plugins/shortcodes/#shortcode-best-practices

The topic ‘[Closed] Custom shortcode in the Toolset View is breaking the View output’ is closed to new replies.