Skip Navigation

[Resolved] The shortcode faces the problem

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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: Asia/Kolkata (GMT+05:30)

This topic contains 5 replies, has 2 voices.

Last updated by Minesh 2 years ago.

Assisted by: Minesh.

Author
Posts
#2512751
Screen Shot 2022-12-09 at 10.45.50 PM.png

Tell us what you are trying to do?

I am trying to use the custom code and short code on Ajax enabled custom search view.

Is there any documentation that you are following?

https://toolset.com/forums/topic/i-want-to-display-only-first-and-last-of-selected-check-boxes/

What is the link to your site?

hidden link

The code was working absolutely great on my simple view. When I make a new view with custom filter with AJAX result display. the actual shortcode appears instead of. the values that short code should produce.

Could you tweak the code to make it work on Ajax refresh?

#2513577

Anybody help??

#2513677

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I do not see the filter "Make" you added to the view currently with the reference URL you shared:
- hidden link

Can you please share where I can see the filter you added as well as where you added the shortcode that is shared by Waqar?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2513955

this is the result when you choose any "make" from the filter and AJAX refreshed the page.

hidden link

#2514149
Screen Shot 2022-12-12 at 1.50.55 PM.png

Additional information,

The custom code your post (https://toolset.com/forums/topic/i-want-to-display-only-first-and-last-of-selected-check-boxes/) provided for me gave an error on Toolset short code editor so I couldn't execute, I put the code in code snippet plugin to run.

I guess If the "Ajax call" option works and there is no error on Toolset custom code editor, but I don't know how to fix the code.

#2514621

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I'm not sure why you disable the custom code snippet added at:
=> Toolset => Settings => Custom code tab => show_year_to_from snippet
(I have corrected this snippet by adding following lines at top of the snippet)
- hidden link

/**
 * New custom code snippet (replace this with snippet description).
 */

toolset_snippet_security_check() or die( 'Direct access is not allowed' );

// Put the code of your snippet below this comment.

Then I've also disable the code snippet you added "Adding shortened year range custom short code " using code snippet plugin here:
- hidden link

I've then changed the view's "Custom Search Setting" to "AJAX results update when visitors change any filter values" and removed the submit button.
=> hidden link

Can you please confirm it works as expected now:
- hidden link