WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
FEATURED IMG POSITION IN MYSQL (4 posts)

  1. tovarishmarxo
    Member
    Posted 1 year ago #

    i'm looking for the Featured image of my products in my mysql server but i can't find them.
    in wp_posts (attachment) not all products have one (even in the website there are!)

    http://wordpress.org/extend/plugins/woocommerce/

  2. tovarishmarxo
    Member
    Posted 1 year ago #

    I explain:
    i can get attachments by the table wp_post (post_type='attachments') but if i have some products with the same thumbnail/attachments i can't get the image with this system.
    i looked for the function wp_get_attachment but i can't take $attachment_id to pass to this function.
    where is stored the featured image of these posts?

  3. bheadrick
    Member
    Posted 1 year ago #

    it's the same as for a normal post - in postmeta, the meta_key _thumbnail_id - this gives you the post id of the attachment post

    if you want the url, use wp_get_attachment_url( get_post_thumbnail_id() )

  4. tovarishmarxo
    Member
    Posted 1 year ago #

    i have to recover out of themes of some of them.
    in an other website, i have done a catalog of my ecommerce autogenerated in pdf.
    the duplicated image (the featured image assigned to more than one product isn't showed.) try visiting:
    http://www.planetshopping.it/catalogo

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.