I have a custom file upload method that I wrote that uploads to the media library. When it uploads it goes to the root WP Media Folder structure. I want to add some code to add to my custom method, like a shortcode, that will allow me to put that file directly into a WP Media Folder folder. Is that possible?
I was hoping there is a shortcode or something like that, that would allow this to be possible.
Can you please provide an example of how one would use that function to do that?
wp_set_object_terms( $file_id, $folder_id, 'wpmf-category' );