Lost customization after switching the WordPress theme

WordPress does not keep track of these changes without the help of special 3rd party plugins. It’s too late here, but there are a some precautionary steps before switching a theme: Copy snippets from your current theme (functions.php etc) Write down all analytics and adsense tracking codes Copy sidebar widgets like social links, advertisements, subscription … Read more

Understanding the child / parent theme relationship

If you replace a template file using your child theme, then yes, your website will ignore those changes, because the child theme’s version will be loaded. There’s no way to merge the files. If you want those changes you will need to copy them into your child theme. This fact has some important implications. If … Read more

How to add a custom class attribute into code wrapper? [duplicate]

To add your custom class to the old posts at once, you can do this via “the_content” filter and using preg_replace or preg_replace_callback function to do a REGEX replacement. A working Example: add_filter( ‘the_content’, function( $content ){ // Don’t do anything if we’re not in a single post if(! is_singular()){ return $content; } $customClass=”custom-class”; return … Read more

SVG icons in Twenty Nineteen

You shouldn’t need to change the viewbox attribute. You can probably just use it. The way I think about is SVGs are like they are drawn on graph paper. The viewbox sets out how many squares there are on the paper and the the path in your examples above are the guides to where to … Read more