Tell us what you are trying to do?
I have this custom code that works perfectly in pulling in my "Media Type" custom taxonomy values into my "Media Type" select drop-down box:
<?php
/**
* New custom code snippet (replace this with snippet description).
*/
toolset_snippet_security_check() or die( 'Direct access is not allowed' );
// Put the code of your snippet below this comment.
// Prepopulate Select Field with Custom Taxonomy Values
add_filter( 'wpt_field_options', 'add_some_options', 10, 3);
function add_some_options( $options, $title, $type )
{
switch( $title )
{
case 'Media Type':
$terms = get_terms( array(
// Custom Post Type Taxonomy Slug not the Name
'taxonomy' => 'media-type',
'hide_empty' => false,
) );
foreach( $terms as $term ) {
$options[] = array(
'#value' => $term->term_id,
'#title' => $term->name,
);
}
break;
}
return $options;
}
I would like to be able to pull in Taxonomy Values from 3 other Custom Taxonomies into the same Custom Post Type. They are Column 1, Column 2, and Column 3. If I try to create the same code for each of the 3 other custom taxonomies it crashes my site because I believe the variables are being called / used by the "Media Type" drop down list and code snippet.
Is it possible to add additional Custom Taxonomy Values to Separate Select Drop Down Boxes within the same Custom Post type Entry page?
The website link is:
hidden link
Thank-you.
My issue is resolved now. Thank you!
I resolved it by just creating a separate code snippet and renaming the function. It worked well.