Wordpress manually Attach Images to Post using SQL -
Wordpress manually Attach Images to Post using SQL -
i have created custom post type called products , need associate multiple images 1 product. actual info exists in different non-wordpress database in table called productimages has productid, imageurl, , image title. need convert info wordpress format wordpress can display need. done regularly using sql automatically deleting products , meta info related , re-adding our main database changes regularly.
from can tell, best way create work manually utilize sql insert productimages attachment posts wordpress when upload media wordpress. associate image product have manually insert records postmeta info in postmeta serialized or , unsure how insert info in right serialize format using mysql. possible mysql?
am going wrong? should doing different? going utilize custom fields till realized custom field can have 1 value , needed 2 values: imageurl , imagetitle each image. seems programatically creating post type of attachment each image best way go. yes?
i forwards anyone's response help in matter.
not expert on serialization wordpress have checked wordpress php function maybe_serialize
sql wordpress
Comments
Post a Comment