
Copy-paste snippets for blocks, block themes, security, performance, Tailwind CSS, PHP and React. New snippets every Monday, Wednesday and Friday, each one run in a real WordPress before it is published.

Change the WordPress widget title tag from h2 to h4 (or any heading) for every sidebar, keeping the theme’s classes and the title text as they are.

Remove “Category:”, “Tag:”, “Archives:” and the other prefixes from WordPress archive titles with one filter, in classic and block themes.

Color chosen WordPress admin menu items with your own background and text colours, so the screens you use daily stand out in the sidebar.

Give a WordPress custom post type the normal Categories and Tags and show those posts on category and tag archives, with or without Custom Post Type UI.

Rotate your WordPress site logo as the visitor scrolls, with a few lines of plain JavaScript that respect reduced-motion settings.

Show any taxonomy as a column in WordPress admin post lists, including custom post types, with one config array and no placeholders.

Give WordPress posts or custom post types a Parent field like pages, with register_post_type_args, safe for post types registered without supports.

Paste this into code block to get that data. Paste that data into Query of Easy posts or Repeater. With this, you can put in query data from ACF Pro as well Credits to: https://wpdevdesign.com/how-to-generate-the-query-string-for-easy-posts-in-oxygen/

Place it above Repeater or East Posts

Change the order of the WordPress blog and archive loop, for example oldest posts first, with pre_get_posts and without touching templates.

This one is work in progress

Show WordPress previous and next post links with the title and featured image under a single post, with escaped output and no errors on the first post.

Hide the Flickity slider page dots in WordPress when there is only one slide, with one CSS rule that works with Flickity v2 and v3.

Oxygen adding class to images by default “.ct-image”. To target all the images use img tag or .ct-image. If you want to play with more options there are some couple of more settings:

Stop WordPress compressing resized images at quality 82: set your own JPEG and WebP quality with the wp_editor_set_quality filter.

Limit WordPress search results to the post types you choose, such as posts and pages, without touching admin, REST or custom queries.

Stretch an image from inside its WordPress content column to the left or right edge of the page, with a small CSS and JavaScript snippet.

Run JavaScript on page load and window resize in WordPress without jQuery: measure an element and hand its size to CSS as a variable.
3rd party plugins actions admin archive block-themes block editor Blocks block theme build capabilities Category core CPT CSS Custom Post custom post types development filters full site editing gutenberg hook Image img load styles maintenance media mu-plugin Must Have npm Oxygen performance php plugins scripts organizer security settings api single product Taxonomy theme.json Tips updates WooCommerce wordpress wp-cli WP Admin