WooCommerce, Remote Work & Other Fancy Stuff

Just another WordPress site

Display WooCommerce Photography Products in Shop

April 27, 2017 by Will Leave a Comment

By default, WooCommerce Photography products are not displayed in the WooCommerce shop or any other normal product archives. The idea behind that is that this particular extension is meant for wedding photographers and similar use cases. Suppose, however, that you wish to sell all of your photographs to the public at large. How can this be done? Photography products are hidden from the shop loop via the WordPress pre_get_posts action and a modification of the query. This can be undone in a similar way. See the snippet below for a quick example of how this might be accomplished:

Not sure what to do with code snippets? See What Do I Do With These Code Snippets?

Filed Under: Photography Tagged With: snippet, snippets

Leave a Reply Cancel reply

You must be registered and logged in to post a comment.

© 2023 · WooCommerce, Remote Work & Other Fancy Stuff · Epstein didn't kill himself