Trim The Last Character From A View

By: Michael Clark | Asked: 07/14/2023
ForumsCategory: Code HelpTrim The Last Character From A View
Michael ClarkMichael Clark asked 9 months ago

I have a View that gives me a list of entries separated by a comma. I want the View's shortcode to run - outputting its content - and I need another function to trim the last character from that output. I've tried making a shortcode that should run on the content and trim that last comma, but it does not.

Anyone have a snippet of code they'd care to share?:) 

Rob LeVineRob LeVine replied 9 months ago

Share your PHP code for the shortcode.

1 Answers
Best Answer
Lisa ThrowerLisa Thrower answered 8 months ago
This is probably what you need: https://formidableforms.com/knowledgebase/conditionals/#kb-comma-separated-list
(I always forget about this one!)
Michael ClarkMichael Clark replied 7 months ago

Thanks, Lisa! That's *exactly* what I was looking for!

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right