get_page_by_title with an apostrophe in variable
Title Hello world!@#$%^*(),.;:\ will work but any title you enter containing ‘ ” < > & characters won’t work because in $content variable you have escaped HTML entities so Mal’s Post becomes Mal’s Post. To bypass it you can use sanitize_title function along with get_page_by_path. function shortcode_equipment($atts, $content = null) { $path = sanitize_title($content); $equipment … Read more