Search Only Post
function search_only_post($query) { if (!is_admin() && $query->is_main_query() && $query->is_search) { $query->set(‘post_type’, ‘post’); } return $query; } add_filter(‘pre_get_posts’, ‘search_only_post’);Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function search_only_post($query) { if (!is_admin() && $query->is_main_query() && $query->is_search) { $query->set(‘post_type’, ‘post’); } return $query; } add_filter(‘pre_get_posts’, ‘search_only_post’);Continue reading
add_filter( ‘post_search_columns’, function( $columns ) { return [ ‘post_title’ ]; } );Continue reading
(function(){ /* ===== Gravity Forms settings: replace the numbers with your form and field IDs ===== */ var JKR_GF={ formId: 0, /* e.g. 7 */ fields:{ /* Hidden field IDs from the form editor */ home:0, scope:0, budget:0, contingency:0, total:0,…Continue reading
terraform { required_providers { stripe = { source = “stripe/stripe” version = “0.1.3” } } } provider “stripe” { # API key is read from STRIPE_API_KEY environment variable # Alternatively, set it explicitly (not recommended for production) # api_key =…Continue reading
// Hide Login Errors add_filter( ‘login_errors’, function ( $error ) { // Customize the Message return ‘Something is wrong!’; } ); // Remove Login Links add_action( ‘login_head’, ‘remove_login_links’ ); function remove_login_links() { add_filter( ‘login_site_html_link’, ‘__return_empty_string’ ); // Back to Link…Continue reading