Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

cpt ui plugin hidden single post type from search results in website

function my_cptui_add_post_type_to_search( $query ) {
	if ( is_admin() || ! $query->is_main_query() ) {
		return;
	}

	$query->set(
		'post_type',
		array( 'post', 'page', 'tour', 'struttura', 'offerta', 'project' )
	);
}

add_filter( 'pre_get_posts', 'my_cptui_add_post_type_to_search' );
Comment

PREVIOUS NEXT
Code Example
Typescript :: Associate of Arts in Broadcast Media Arts 
Typescript :: Define a function shiftRight which receives a list as input, and returns a list with all the elements shifted to the right 
Typescript :: Destructuring props in styled-components 
Typescript :: get required schema fields name into array mongoose typescript 
Typescript :: typescript -g doesnst read tsconfog 
Typescript :: Could not resolve all artifacts for configuration 
Typescript :: How to loop the jquery formData key object in jqueyr 
Typescript :: Distributed Cron Job 
Typescript :: how-to-pass-data-between-middleware 
Typescript :: What is the reason we are using properties file 
Typescript :: benefits of waxing body hair 
Typescript :: nativescript routerextensions navigate 
Typescript :: CREATE FUNCTION which accepts LIST as argument 
Typescript :: how to use client and webresource objects to do https call 
Typescript :: firewalld list ports redbat 8 
Typescript :: vba check if two sheets are the same 
Typescript :: what do you expect from us 
Typescript :: Powershell show inactive account in active directory 
Typescript :: how to get remainder in typescript 
Typescript :: pptxgenjs bullet 
Typescript :: how to make a tool detect a click and add points roblox studio 
Typescript :: multi select + search + Multiselect and Search in angular 13 
Typescript :: not able to access string in template angular 8 
Typescript :: how to pass data between requests 
Typescript :: how to deduct user points when he buy something laravel 
Typescript :: Rails flags for tests assets and helpers 
Typescript :: why touchable opacity to take width of its child 
Typescript :: declare function iwth interface typescript 
Typescript :: flutter create widget for each element of list 
Typescript :: circular indicator gets whole page flutter 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =