WordPress.org

Ready to get started?Download WordPress

Forums

Custom Field Taxonomies
Use in WP Multisite (8 posts)

  1. stoi2m1
    Member
    Posted 2 years ago #

    What would I need to change in order to make this convert custom fields in WordPress Multisite? And is it possible to feed it an comma separated list of custom fields or do i have to submit them one at a time?

    Thanks,
    Jesse

    http://wordpress.org/extend/plugins/custom-field-taxonomies/

  2. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    Custom fields are per-blog, so do you mean converting custom fields in all blogs at once or what?

    And is it possible to feed it an comma separated list of custom fields or do i have to submit them one at a time?

    Custom field keys can contain commas (and any other character for that matter), so you have to enter them one at a time.

  3. stoi2m1
    Member
    Posted 2 years ago #

    I built a custom post type with very specific options for custom field. So I know what the fields are and what potential contents they can contain. I am not interested in using taxonomies for the custom fields to make them more useful.

    Yes, I need this to work on all blogs in my network and I need to do it for two different custom fields with about 25 different options. Anything that you can think of that will help me tweak your plugin to make things work faster for me would be awesome. Thanks...

  4. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    I am not interested in using taxonomies for the custom fields to make them more useful.

    This plugin is for converting custom fields into taxonomies. If that's not what you want to do, then why are you using this plugin?

    I need to do it for two different custom fields with about 25 different options.

    Each of the two custom fields would be a separate taxonomy and each of the 25 possible values would become a term in that taxonomy.

    You would have to do this for each blog.

    Obviously, if you know PHP, you can loop through each blog programatically using switch_to_blog() and call the appropriate function from the plugin.

  5. stoi2m1
    Member
    Posted 2 years ago #

    I know what your plugin does, and it does what I am looking for. Thats why I am asking questions on how to make it jsut a bit more useful and able to do the job Im looking for quicker.

    I do know switch_to_blog(), Im just not sure where to use it. Which function should I place the switch blog loop in?

  6. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    Something like this:

    foreach ( get_all_blog_ids() as $blog_id ) {
      switch_to_blog( $blog_id );
    
      CFT_Admin::convert( $cf_key, $taxonomy );
    }

    Note that get_all_blog_ids() doesn't actually exist. You'll have to write it or find something else that does the job.

  7. stoi2m1
    Member
    Posted 2 years ago #

    Where in your plugin would I add that?

  8. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    It doesn't matter where you add it.

    And please don't ask me how to implement get_all_blog_ids(). I really don't have time to hold your hand through the entire process.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.