Get url of product’s images (woocommerce)

What happen when a post (product) didnt have a guid,because it has the same image with another product ? For example: Query1: select guid from wp_posts where post_type=”attachment” and post_parent=num Returns nothing. Query2: select guid from wp_posts where ID=num Returns the url of product. In this case how should i find the image url of … Read more

How to add images to taxonomies?

Q: Is it possible to add images to all of my taxonomies (default and custom ones)? Note: I do not want to use any plugins (not my favourite solution for design related matters). Usage: I want to create really practical custom post type portfolio with custom taxonomies. For example, custom taxonomy – clients, so if … Read more

Taxonomy: Why ‘with_front’ => false DOES NOT WORK?

Seriously, why ‘with_front’ => false does not work as it should be? It is supposed to remove TAXONOMY BASE NAME and my question is why it does not work? I just dont want the taxonamy base slug appear in my URL and codex says ‘with_front’ => false should help but it does not. Leaving the … Read more

Modify Taxonomy pages to exclude items in child taxonomies

I found this question: Theres a way to use $query->set(‘tax_query’ in pre_get_posts filter? which seems to indicate that yes, you can alter the taxonomy query on taxonomy archives via pre_get_posts(). so i came up with add_action(‘pre_get_posts’, ‘kia_no_child_terms’ ); function kia_no_child_terms( $wp_query ) { if( is_tax() ) { $wp_query->tax_query->queries[0][‘include_children’] = 0; } } as well as … Read more