WordPress.org

Ready to get started?Download WordPress

Forums

Category Meta plugin
WordPress Version 3.1.3 Multisite (3 posts)

  1. metalonlinecom
    Member
    Posted 3 years ago #

    Hey there.

    I try to geht this baby running in WordPress Version 3.1.3 with Multisite. I can create new term-meta ("band_website") for tags BUT the value of the new term-meta is not stored when I edit a tag.

    Any idea how I can fix this?

    Second question: I want to show the term-meta in the tag.php template and wonder how to get the value of my term-meta "band_website" shown.

    Thanks for your help!
    Sören

    http://wordpress.org/extend/plugins/wp-category-meta/

  2. Juarez P. A. Filho
    Member
    Posted 3 years ago #

    Same here :/

  3. Brian Zeligson
    Member
    Posted 2 years ago #

    This happens because the table that the plugin uses is created on plugin activation, and the plugin activation method is not multisite aware. The formal way of addressing this would be by following the structure found here - http://wordpress.org/extend/plugins/proper-network-activation/

    We are actually using this as a must-use plugin, which never runs an activation hook, so we handled it a bit differently. The solution we used involves fewer lines of code and will work whether you are running it as a must use or just using network activate. The only tradeoff is one extra query every time you load wp-admin.

    Add the following between lines 163 and 164 of wp-category-meta.php:

    global $wptm_table_name;
    global $wpdb;
    if(is_admin() and $wpdb->get_var("show tables like '$wptm_table_name'") != $wptm_table_name) {
    wptm_createTable($wpdb, $wptm_table_name);
    }

    What this does now is every time you load wp-admin, the plugin will check to ensure that a table exists for the current network site, and if it does not, it will create it.

    Works like a charm.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic