Problem with a shortcode generating a error [closed]

If the error goes away when you change the theme, it’s possible that the issue is related to the child theme. It’s important to note that deleting the child theme will not delete any information stored in the database, as that information is stored separately from the theme files. However, if you delete the child … Read more

wordpress shortcode url decode non Latin character

It makes sense to look at the PHP function rawurldecode, which decodes URL-encoded strings. https://www.php.net/manual/en/function.rawurldecode.php For example, echo rawurldecode(get_permalink($post->ID)); will show the decoded post URL. But this isn’t really needed in hyperlink code. Sorry I didn’t just write a comment, I don’t have enough points for that option.

conditional shortcodes

Thank you, @Howdy_McGee! current_filter() is exactly what I’ve been looking for. Here is what I did: function french_example( $atts , $content = null ) { $currentFilter = current_filter(); if ($currentFilter == the_content) { return ‘<span class=”ex” xml:lang=”fr” lang=”fr”>’ . do_shortcode($content) . ‘</span>’; } elseif ($currentFilter == the_title) { return ‘<span class=”ex” xml:lang=”fr” lang=”fr”>’ . do_shortcode($content) … Read more