I have both WP Term Meta and WP Term Images plugins installed but when I go to the add Term page or try to edit an existing Term I get the following error:
Fatal error: Call to undefined function wp_get_attachment_image_url() in /Users/luismartins/Sites/alpenglow-expeditions/wp-content/plugins/wp-term-images/includes/class-wp-term-images.php on line 142 Call Stack #TimeMemoryFunctionLocation 10.0022359824{main}( )../edit-tags.php:0 20.997544748328do_action( )../edit-tags.php:528 30.997644750096call_user_func_array:{/Users/luismartins/Sites/alpenglow-expeditions/wp-includes/plugin.php:505} ( )../plugin.php:505 40.997644750272WP_Term_Meta_UI->add_form_field( )../plugin.php:505 50.997844750440WP_Term_Images->form_field( )../class-wp-term-meta-ui.php:504
Any tips of what might be going wrong?
]]>Hi John
I’m having trouble retrieving a value and I’m obviously not doing this correctly.
I have a taxonomy called ‘shop_vendor’ and I’ve created a new meta key called ‘vendor_logo’.
Now I’m trying to retrieve that value when I’m not in the category itself and I can’t seem to access it. I can get the term ID, that’s no problem.
Are you able to assist?
Thanks!
]]>IF you are in a Multisite the switch_to_blog function will not work krrectly with WP Term Meta. All data will be stored in main site termmeta table.
To fix this you mus change the add_termmeta_to_db_object() method of WP_Term_Meta class to:
public function add_termmeta_to_db_object() {
$this->db->termmeta = "{$this->db->prefix}termmeta";
$this->db->tables[] = "termmeta";
}
]]>
I plan on implementing term meta on my site in the next few weeks using this plugin. I’ve been following some of the discussions on implementing term meta into core in WP 4.4, and saw that this plugin is compatible with the proposed implementation.
When 4.4 is released, what would the migration process look like? Will this simply use the same database table as core?
]]>