Why are some SVG-images not visible in my footer?

Not sure if you’ve already done this, so forgive me if I’m telling you something you already know. But WordPress doesn’t support SVG Uploads out of the box, so to speak. This is due to security issues that can be created when a user uploads SVGs with malicious code. Mainly, a problem if you let … Read more

WordPress search form and input type=”image”

You have to use javascript or jQuery for this form. You can use like this: <!– Custom Style for the form –> <style type=”text/css”> body { margin: 0; padding: 30px 0; font-family: arial; font-size: 16px; line-height: 22px; max-width: 800px; margin: 0 auto; overflow: hidden; } body:after { content: ”; clear: both; display: table; } img{ … Read more

Enable CORS for getting an inline SVG by URL

By using custom rewrite_url, I was able to hijack the request and set its CORS-friendly headers. class Cors_Media { const QUERY_VAR = ‘cors_media_id’; public function init() { add_action(‘init’, [$this, ‘add_rewrite_rule’]); add_filter(‘query_vars’, [$this, ‘query_vars’]); add_action(‘template_redirect’, [$this, ‘template_redirect’]); } public function query_vars(array $qs) { $qs[] = ‘cors_media_id’; return $qs; } public function add_rewrite_rule() { add_rewrite_rule( ‘^cors_media_id/([0-9]+)/?’, ‘index.php?cors_media_id=$matches[1]’, … Read more