PHP code example of mcaskill / wp-term-locks

1. Go to this page and download the library: Download mcaskill/wp-term-locks 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/ */

    

mcaskill / wp-term-locks example snippets


$terms = get_terms( 'category', array(
	'depth'      => 1,
	'number'     => 100,
	'parent'     => 0,
	'hide_empty' => false,

	// Query by lock using the "wp-term-meta" plugin!
	'meta_query' => array( array(
		'key' => 'locks',
	) )
) );