I've created a shortcode that calculates the length of a post title.
I've inserted that shortcode in a column of a View that gives a tabular display of the post type.
That all works fine.
I've now just added a front-end filter to the view (such an excellent feature!) and I want the filtered view to displayed via JS rather than reloading the whole page.
Unfortunatlely, the shortcode doesn't get executed when there's a JS reload, and the filtered view shows the shortcode itself.
Is this what you'd expect to happen? Is there a fix?
In the worst case, I can calculate the title length when the post is created or edited and store it in the post as another custom field - but I'd rather calculate it on the fly: it's much more straightforward!
Thanks.
Hi Alex,
Thank you for contacting us and I'll be happy to assist.
I performed a few tests on my website, with a custom shortcode and a view with AJAX results, but couldn't reproduce the issue.
Can you please share temporary admin access, so that I can check how the view and the custom shortcode are set up?
( I've set your next reply as private )
Important: Please make a complete backup copy of the website, before sharing the access details.
regards,
Waqar
Hi Alex,
Thank you for sharing the details.
I noticed that in your custom shortcode's settings, the option to execute in "AJAX calls" was not checked.
( screenshot: versteckter Link )
I've enabled that option and that shortcode now renders properly when the results update, through AJAX.
regards,
Waqar
Oh my!
I've never looked at those settings - they seem to be all set by default. I guess I must have inadvertently clicked the checkbox.
My issue is resolved now. Thank you!