Skip Navigation

[Resolved] Own shortcode within view not showing in the correct place

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

Last updated by jacoboG-2 4 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#1602679
view-frontend.jpg
view.png
shortcode.png

Hi,

I have coded a shortcode which shows some toolset fields. The shortcode works well on within an Elementor template for the single custom post type. But when I try to use it on a Toolset View that lists all the post of that CPT, I don't know why the result is shown just before anything else is showed in the results loop.
I'm calling it within the content template of the loop for each post, so I don't why it is showing in a completely different place concatenating the results of all posts.

What may I be doing wrong?

Thank you very much,

Jake

#1602913

Shane
Supporter

Languages: English (English )

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

Hi Jake,

Thank you for getting in touch.

Normally we do not assist with custom coding. However given that your case can be resolved quite easily then I can make a suggestion for you to do.

I see where you are using "echo" to display your items, however you will need to use "return" for the items to be displayed in the correct location.

Please try this and let me know if this helps.
Thanks,
SHane

#1602929

My issue is resolved now. Thank you!