PHP code example of itsmejgrant / taxonomy-helper
1. Go to this page and download the library: Download itsmejgrant/taxonomy-helper 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/ */
itsmejgrant / taxonomy-helper example snippets
function assigning_to_one_post_type() {
$regions = new Taxonomy('Regions', 'posts');
}
add_action('init', 'assigning_to_one_post_type');
function assigning_to_multiple_post_types() {
$regions = new Taxonomy('Regions', ['posts', 'pages']);
}
add_action('init', 'assigning_to_multiple_post_types');