Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Prevent Displaying Uncategorized Links Wordpress

// Prevent Displaying Uncategorized Links Add to Functions file

function remove_uncategorized_links( $categories ){

	foreach ( $categories as $cat_key => $category ){
		if( 1 == $category->term_id ){
			unset( $categories[ $cat_key ] );
		}
	}

	return $categories;
	
} add_filter('get_the_categories', 'remove_uncategorized_links', 1);
Comment

PREVIOUS NEXT
Code Example
Php :: New in initializers - PHP 8.1 
Php :: kill phpstorm process ubuntu 
Php :: php header x-powered-by 
Php :: if isset post php 
Php :: wp clean db terms 
Php :: php check if string startswith 
Php :: dropdown in crud application YII 
Php :: get data from model in chunks laravel 
Php :: nl_langinfo — Query language and locale information 
Php :: set php version in php.ini 
Php :: laravel-websockets 403 forbidden error 
Php :: Code of getting sum of digits 
Php :: automatically make created_by and updated_by using observer laravel 
Php :: org.springframework.web.context.request.async.AsyncRequestTimeoutExceptionTimeoutDeferredResultProcessingInterceptor 
Php :: woocommerce update_status() email 
Php :: laravel create pivot migration 
Php :: remove nul value aray php 
Php :: create associative array php by key value site:stackoverflow.com 
Php :: install wget downloader php 
Php :: Problems with Special Characters between Angular http post and PHP 
Php :: union for rwos 
Php :: list database table rows plugin wordpress 
Php :: remove the public from url in laravel 
Php :: how to compare two strings ignoring accentuation in php 
Php :: laravel query with optional filter 
Php :: amazon linux 2 php.ini changes not working 
Php :: chr (PHP 4, PHP 5, PHP 7, PHP 8) chr — Generate a single-byte string from a number 
Php :: how get database structure in laravel 
Php :: Rewrite .php file without .php extension with .htaccess ULTIMATE SOLUTION 
Php :: php pdo check if execution worked 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =