I'm trying to add custom shortcode to Views Content Template, but have issue with display it properly.
Shortcode need to display at right column after categories list, but it displayed before all views layout.
Can you help me?
Most probably your ShortCode does echo instead of return the values.
This is a Custom ShortCode that we can not debug for you.
If the ShortCode is coded correctly it will display exactly where you want it to display, as long you do not pass HTML/CSS (positioning) in the ShortCode code itself, and as long it returns the values.
More info here:
https://codex.wordpress.org/Shortcode_API
Hi Beda!
I'm trying with echo, print and printf
I'm trying to insert shortcode to template file of wordpress theme, where it is displayed correctly. When i trying insert it in Views, receive not properly result.
Maybe need to use alternative method to display values from shortcodes?
In my project Toolset Views used for the majority of the content and archives for custom content types.
I mentioned, that you can not echo a ShortCode.
You must return it.
Please study the WordPress Codex DOC I passed to you:
https://codex.wordpress.org/Shortcode_API
(especially section "Output")
This has nothing to do with Toolset. Toolset will display your ShortCode exactly where you plant it, as long you correctly code and return this.
If you need help with custom programming, work which is beyond the scope of our support.
At this point I would suggest you consider contacting one of our certified partners from this link:
https://toolset.com/consultant/
You will get the custom assistance you need to get on with your project.
I'm change shortcode function with return variable and now it works well!
Thx!
remove my code from this topic please
You should be able to edit your own replies.
It is not really good to remove topic-crucial examples from a thread as the issue will become unclear.
Anyway I have removed all your replies code.