Skip to content

Instantly share code, notes, and snippets.

@tdmrhn
tdmrhn / test.php
Last active March 28, 2023 09:05 — forked from andreiglingeanu/test.php
Change search slug add rewrite rule
<?php
add_action('template_redirect', function () {
if (is_search() && isset($_GET['s'])) {
$current_url = wp_parse_str(wp_parse_url(blocksy_current_url())['query'], $query_args);
unset($query_args['s']);
wp_redirect(add_query_arg(
$query_args,
<?php
add_filter(
'blocksy:archive:render-card-layers',
function ($layers, $prefix, $featured_image_args) {
$post_id = get_the_ID();
if (
get_post_type($post_id) !== 'blogger-template'
||
@tdmrhn
tdmrhn / gutenberg-audit.php
Created February 23, 2023 04:44 — forked from hughc/gutenberg-audit.php
Gutenberg Audit for WordPress
<?php
/*
Plugin Name: Gutenberg Audit
Plugin URI: http://highbrow.com.au/plugins/gutenberg-audit
description: What blocks is your site using?
Version: 0.1
Author: Hugh Campbell
Author URI: http://highbrow.com.au/
License: GPL2
*/
@tdmrhn
tdmrhn / blc-woo-gallery-skip-featured.php
Last active January 28, 2022 07:40 — forked from andreiglingeanu/functions.php
Blocksy Woo Gallery Skip Featured Image