Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to removde product into shop loop via product id

add_action('pre_get_posts', 'remove_products_from_shop_page');

function remove_products_from_shop_page($q)
{
	$rm_products = array();
	if (!$q->is_main_query()) return;
	if (!$q->is_post_type_archive()) return;
	if (is_shop()) {
		$q->set('post__not_in', $rm_products);
		return $q;
	}
	remove_action('pre_get_posts', 'remove_products_from_shop_page');
}
// $rm_products Is array and equal to your products id
Comment

PREVIOUS NEXT
Code Example
Php :: php get referrer ajax 
Php :: what is composer in laravel 
Php :: php foreach multidimensional array recursive 
Php :: apt-get install php wordpress extensions 
Php :: bootstrap autocomplete example laravel 
Php :: show sender name laravel 
Php :: log magenot 1 
Php :: is search page wordpress dev 
Php :: php pdo delete 
Php :: exit and echo php 
Php :: install pdo mysql in alpine-apache php 5.6 
Php :: create file in directory php 
Php :: laravel return from db reorder 
Php :: custom blade 
Php :: Error : Call to undefined method IlluminateNotificationsChannelsMailChannel::assertSentTo() 
Php :: Woocommerce Adding Content to the Custom Endpoint 
Php :: php update sql database from form 
Php :: no sass folder in laravel 
Php :: php warning array to string conversion 
Php :: append variable to string php 
Php :: check count in laravel 
Php :: how to add custom navigation menus in wordpress themes 
Php :: wpquery search taxonomy 
Php :: delete laravel error log 
Php :: This domain is not registered with Tiny Cloud. Please see the quickstart guide or create an account. 
Php :: php preg_replace function 
Php :: if else in php 
Php :: PHP XML Expat Parser 
Php :: get image field in custom post type category taxonomy 
Php :: how to convert an array to uppercase before storing in database 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =