I am making use of the "SEO Ultimate" plugin for the seo purpose. The meta box is working fine for the post_type = post
. But as I am saving the meta details for the post_type = attachment
then it's not working. It just leaves the field blank after saving the details.
After research on the plugin, I found a function name save_postmeta_box
which is hooked with save_post
. I thinks there is a problem with the hook which doesn't work on post_type = attachment
.
After a research on the hook's, I got the solution for this error, you just need to add a attachment hook. And the plugin will work fine for post_type=attachment
.
Go to the line no. 227 "http://hostname.com/wp-content/plugin/seo-ultimate/plugin/class.seo-ultimate.php" and add this code below as given here:
add_action('edit_attachment', array ( &$this, 'save_postmeta_box'));
Now you can add the meta details on the meta boxes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With