Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114 Alternative Function to [CATEGORY_NAME] Shortcode | Event Espresso - Staging Server
I’m currently using this to get a list of associated categories for my event listings:
[code language=”php”] $programs_string = do_shortcode(‘[CATEGORY_NAME event_id=”‘.$event_id.'”]’);
$programs_array = explode(‘,’, $programs_string );[/code]
This would usually work great, except that some of my categories have commas in them, so using a comma delimiter is not going to work in this case. Is there a more direct public function that I can use to get an array of categories, not a string?
This topic was modified 11 years, 4 months ago by Deborah Walden.
This topic was modified 11 years, 4 months ago by Deborah Walden.
This topic was modified 11 years, 4 months ago by Deborah Walden.
This topic was modified 11 years, 4 months ago by Deborah Walden.
This topic was modified 11 years, 4 months ago by Deborah Walden.
In replacing the comma with a pipe, I was able to successfully use the php explode() function to get a true array of categories, including those with commas in them.
Viewing 2 reply threads
The support post ‘Alternative Function to [CATEGORY_NAME] Shortcode’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.