Skip Navigation

[Resolved] Convert Shortcode to String

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to pass our Types shortcode in the Post Expirator plugin to provide the values. However this was not working.

Solution:

The issue here is that the post Expirator plugin isn't able to process the shortcodes.

This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by COOP2016 5 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#902084

I am trying to get a third party plugin (Post Expirator) to accept wp-shortcodes.

I'm using the plugin to send notifications out when a post has expired. It has a text input field that accepts email address separated by commas.

I'm trying to get it to accept [wpv-post-author format="meta" meta="user_email"] and a custom field I created [types field='content-owner-contact'][/types] (which contains an email address)

It fails to accept them.

Is there any way I can convert the content of the short codes above to a sting? i.e get them to output the content they hold?

I know its a bit of a long shot, but any assistance is appreciated.

#902115

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Try adding the output='raw' attribute to the shortcode and let me know if this helps.
Thanks,
Shane

#902145

Hi Shane,

Thanks for your help. I tried that, but no joy.

#902184

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Then it seems here that the Post Expirator plugin isn't able to handle shortcodes .

Thanks,
Shane

#902339

I think you're correct.
Thanks for your help.

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