Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: cpt fields not publish b/c of publish button is not active #9264
    nahoma12
    Participant

    PLEASE i am waiting the answer ..please!!!

    in reply to: cpt fields not publish b/c of publish button is not active #9261
    nahoma12
    Participant

    one thing i want to add is…. i have field in my organization cpt called price and i want it number field with currency like (usd, etb, ..) how can i do it?

    Attachments:
    You must be logged in to view attached files.
    in reply to: cpt fields not publish b/c of publish button is not active #9259
    nahoma12
    Participant

    hi steve thanks for your fast response, classic editor working and i add taxonomy, i want select list type of taxonomy, but it don’t work. here is the code.

    add_filter('piklist_taxonomies', 'org_type_taxonomy');
      function org_type_taxonomy($taxonomies) {
         $taxonomies[] = array(
            'post_type' => 'organizations'
          ,'name' => 'orgtype'
          ,'show_admin_column' => true
          ,'configuration' => array(
            'hierarchical' => true
            ,'labels' => piklist('taxonomy_labels', 'orgtype')
            ,'hide_meta_box' => false
            ,'show_ui' => true
            ,'query_var' => true
              )
          );
        return $taxonomies;
      }

    i add this on the custom plugin php file

    <?php
    /*
    Title: taxonomy for my org cpt
    Description: type of org 
    Taxonomy: orgtype
    
    */
    piklist('field', array(
      'type' => 'select'
      ,'scope' => 'taxonomy'
      ,'field' => 'orgtype'
      ,'label' => 'Org Type'
      ,'description' => 'Terms will appear when they are added to this taxonomy.'
      ,'choices' => array(
          '' => 'Choose Term'
        )
       + piklist(get_terms('org_type_taxonomy', array(
          'hide_empty' => false
        ))
        ,array(
          'term_id'
          ,'name'
        )
      )
    ));

    i add this on the part/setting/taxonomy.php

    but i doesn’t work i try with out the taxonomy.php and with taxonomy.php same out came (check box taxonomy) , i think my custom plugin .php is not reading my taxonomy.php or some code error.

    and where to add this code

    function my_register_taxonomy_for_cpts()
    {
    
      register_taxonomy_for_post_type('orgtype', 'post');
    }
    add_action('init', 'my_register_taxonomy_for_cpts');

    please help me

    Attachments:
    You must be logged in to view attached files.
Viewing 3 posts - 1 through 3 (of 3 total)