unsalkorkmaz
Member
Posted 7 months ago #
I tried;
array(
'name' => '3',
'label' => '3',
'type' => 'select',
'scope' => array( 'post' ),
'options_type' => 'terms',
'options_query' => array( 'taxonomy' => 'konum' ),
'capabilities' => array( 'edit_posts' )
),
or
'options_query' => array( 'terms' => 'konum' ),
or
'options_query' => array( 'konum' ),
or
'options_query' => array( 'tax_query' => 'konum' ),
i couldnt get terms.. what should be options_query?
http://wordpress.org/extend/plugins/developers-custom-fields/
Check slt-cf-init.php lines 471-486:
$args = $field['options_query'];
$taxonomies = $args['taxonomies'];
Sorry, the docs could probably be better for this. I guess it should be:
'options_query' => array( 'taxonomies' => 'konum' )
Then you can add other key/values that will get passed through as the $args parameter for get_terms.
I've updated the docs:
http://sltaylor.co.uk/wordpress/plugins/slt-custom-fields/docs/#functions-boxes-fields
Let me know if this works - I'm currently travelling and I haven't had the chance to double-check this!
unsalkorkmaz
Member
Posted 7 months ago #
Yeah it gots taxonomies now.. but.. not caring parent/child taxonomy.
Can you check this solution: http://wordpress.stackexchange.com/questions/18578/taxonomy-dropdown-metabox-in-the-back-end ?
That solution is pretty cool working. is it possible to implement this?
or is it possible to insert custom solutions from outside to Developer's Custom Fields' metabox?
Handling hierarchical taxonomies should be in the next version.
Meantime, you can hack nearly anything you want with hooks. Check the docs:
http://sltaylor.co.uk/wordpress/plugins/slt-custom-fields/docs/#hooks
Especially slt_cf_populate_options.