Skip to content

Instantly share code, notes, and snippets.

@ArtfulPussycat
ArtfulPussycat / child-theme-functions.php
Created December 22, 2016 15:04 — forked from lots0logs/child-theme-functions.php
WordPress :: Divi Builder :: Search Module :: Custom Post Types
<?php
function my_remove_default_et_pb_custom_search() {
remove_action( 'pre_get_posts', 'et_pb_custom_search' );
add_action( 'pre_get_posts', 'my_et_pb_custom_search' );
}
add_action( 'wp_loaded', 'my_remove_default_et_pb_custom_search' );
function my_et_pb_custom_search( $query = false ) {
if ( is_admin() || ! is_a( $query, 'WP_Query' ) || ! $query->is_search ) {
@ArtfulPussycat
ArtfulPussycat / mu-plugin.php
Created March 18, 2017 22:00
MU-Plugin boilerplate
<?php
/**
* Plugin Name: Your Functionality MU-Plugin Name
* Plugin URI: http://example.com/plugin-name-uri/
* Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area.
* Version: 1.0.0
* Author: Your Name or Your Company
* Author URI: http://example.com/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt