PHP code example of stuttter / wp-term-colors
1. Go to this page and download the library: Download stuttter/wp-term-colors library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
stuttter / wp-term-colors example snippets
$terms = get_terms( 'category', array(
'depth' => 1,
'number' => 100,
'parent' => 0,
'hide_empty' => false,
// Query by color.
'meta_query' => array( array(
'key' => 'color',
'value' => '#c0ffee'
) )
) );