Search Filter by Genre and Artist

add_action( ‘pre_get_posts’, ‘softcomplexmusic_custom_search_filter’ ); function softcomplexmusic_custom_search_filter( $query ) { if ( !is_admin() && $query->is_main_query() && $query->is_search ) { $tax_query = []; if ( !empty($_GET[‘genre’]) ) { $tax_query[] = array( ‘taxonomy’ => ‘genre’, // Ensure this matches your site’s taxonomy slug…Continue reading

PASSWORD PROTECT

// Simple public password protection for WordPress Multisite Subsite with mapped domains add_action(‘init’, function() { $required_password = ‘letmein’; //Continue reading

Auto Taxonomy During Import

// 1. Smart feed category assignment + fallback marking add_action(‘pmxi_saved_post’, function($post_id, $xml_node, $import_id) { try { $feed_category = ”; // Universal JSON/XML parsing if (is_array($xml_node)) { if (!empty($xml_node[‘tags’]) && is_array($xml_node[‘tags’])) { foreach ($xml_node[‘tags’] as $child) { if (isset($child[‘name’]) && !empty($child[‘name’]))…Continue reading

Auto Taxonomy During Import

// 1. Smart feed category assignment + fallback marking add_action(‘pmxi_saved_post’, function($post_id, $xml_node, $import_id) { try { $feed_category = ”; // Universal JSON/XML parsing if (is_array($xml_node)) { if (!empty($xml_node[‘tags’]) && is_array($xml_node[‘tags’])) { foreach ($xml_node[‘tags’] as $child) { if (isset($child[‘name’]) && !empty($child[‘name’]))…Continue reading

Overall Rating Shortcode

function get_related_review_field( $atts ) { $atts = shortcode_atts( [ ‘review_field’ => ”, ‘relation_field’ => ‘related_review’, ‘post_id’ => null, ], $atts ); // Get the current post ID, even inside Elementor Loop $post_id = $atts[‘post_id’] ? $atts[‘post_id’] : get_queried_object_id(); if (…Continue reading

Allow mixed cart support with Stripe Payment Elements

add_filter( ‘edd_gateway_supports’, ‘prefix_maybe_add_mixed_cart_support’, 999, 2 ); /** * Allow Stripe to support mixed carts. * Requires EDD 3.2.7. */ function prefix_maybe_add_mixed_cart_support( $supports, $gateway ) { if ( ‘stripe’ === $gateway ) { $supports[] = ‘mixed_cart’; } return $supports; }Continue reading

Hides Enable Classic Editor Toggle Button for DIVI Theme

/*hide buttons when the Enable Classic Editor toggle is ENABLED*/ add_action(‘admin_head’, ‘pa_hide_standard_editor_button’); function pa_hide_standard_editor_button() { echo ‘ ‘; } /*hide buttons when Enable Classic Editor toggle is DISABLED*/ add_action(‘admin_head’, ‘pa_hide_default_editor_button’); function pa_hide_default_editor_button() { echo ‘ ‘; }Continue reading

Add Font To Salient Theme Admin

function salient_redux_custom_fonts() { return array( ‘Custom Fonts’ => array( ‘PP Formula Extended Medium’ => ‘PP Formula Extended Medium’ ) ); } add_filter( “redux/salient_redux/field/typography/custom_fonts”, “salient_redux_custom_fonts” );Continue reading