Skip Navigation

[Resolved] Custom Function Shortcode not displaying in Toolset Views

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 1 reply, has 1 voice.

Last updated by Nashaat 1 year, 8 months ago.

Author
Posts
#2446565
function.png
Screenshot.png

Tell us what you are trying to do?

Hi,
I have created a function similiar to this one: https://toolset.com/forums/topic/number-field-commas/

The only different i would like to remove any Quotes from the sting which should be like this:

[idy_remove_quoute]Ho"w Ar'e Yo,u De"ar?[/idy_remove_quoute] // Output would be: How Are Yo-u Dear?

This function works when its added in wordpress gutenberg shortcode block:

add_shortcode( 'idy_remove_quoute', 'idy_remove_quoute_func');
function idy_remove_quoute_func( $atts, $content ) {

  	$string = do_shortcode($content);
  	$string = str_replace('"', "", $string);
  	$string = str_replace('"', "", $string);
  	$string = str_replace('"', "", $string);
	$string = str_replace('"', "", $string);
	$string = str_replace('"', "", $string);
  	$string = str_replace("'", "", $string);
  	$string = str_replace(",", "-", $string);
	return $string;

}

The issue is that this is not working when added to the loop of views like screenshot. I have added the shortcode to "Third-party shortcode arguments" and to "Functions inside conditional evaluations". this is not helping as well.

What is missing so this shortocde will work in Views loop as well?

#2446647

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.