After I tried out a few of the available plugins for syntax highlighting, I ended up with a DIY solution that I’m really happy with.
The main part of it is PrismJS which is an excellent JS/CSS solution for the job.
I was trying to avoid anything that’s not out-of-the-box or requires custom shortcodes and PrismJS not only looks great, it also is very simple to use with the Classic Editor as well as the current version of Gutenberg. Continue reading “Syntax Highlighting in WordPress”
I’ve had this issue on a site where we’re using WPBakery Page Builder and its built-in “Grid Builder” for showing a selection of pages. Within the Grid Builder, we’re outputting the page excerpt.
This means that WordPress shows certain shortcodes (or some variations of them) within the excerpt: Continue reading “Remove WPBakery Page Builder (formerly Visual Composer) shortcodes from the Excerpt”
I needed to delete 20.000+ rows in the wp_postmeta table which related to a Custom Post Type and Yoast SEO. The SQL I ended up using was this:
FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.post_type LIKE '%CUSTOMPOSTTYPENAME%'
AND pm.meta_key LIKE '%_yoast_%'
IMPORTANT: Don’t try this at home. And backup your database! I’m not responsible for any case of data loss!
A plugin that is uploaded to the “mu-plugins” folder is always activated by default and can not be accidentally deactivated by the user. It was originally created for multi-site blogs (as “multi-user” plugins that were active on all sites of a multi-site) but can now also be used for single sites.
- can not be deactivated
- are always executed
- can not use activation hooks
- loaded before all other plugins (in alphabetical order)
Visit the documentation for more.