Rhyso

Head computer guy at the IT Team. Likes coding, especially React. If not coding, will be in the water.

Limit WordPress Search results to Custom Post Type (and dont break your app)

So recently I was asked to limit search results to a particular custom post type, for example a woocommerce product, here is how I did it: [dt_code] // Change search function globally to search only post, page and portfolio post types function prefix_limit_post_types_in_search( $query ) { if ( $query->is_search ) { $query->set( ‘post_type’, array( ‘product’ […]

Limit WordPress Search results to Custom Post Type (and dont break your app) Read More »

Woocommerce show different text depending on whether a product is In or Oust of Stock

I was asked by a client to make a modal popup for a product when the thumbnail was clicked on, as part of this popup they wanted the product to show some text letting the user know if it was in stock or not. I have been doing a bit of react.js work recently and

Woocommerce show different text depending on whether a product is In or Oust of Stock Read More »

Handy tip – convert PDF’s to JPEG from the command line

If you use Linux or Mac then there is a quick and easy way to convert each page of a pdf to a jpeg image. To do this start by installing image magick: [dt_code]sudo apt-get install imagemagick[/dt_code] Then just run convert replacing ‘in.pdf’ with your pdf’s filename: [dt_code]convert in.pdf out.jpg[/dt_code] Voila!

Handy tip – convert PDF’s to JPEG from the command line Read More »

Woocommerce Uploads, 403 Errors & Permissions

Woocommerce has a great system for creating virtual, ‘downloadable’ products. This is fantastic for when you offer some sort of digital product which the user can access after checkout. An example of this would be a training organisation, using downloadable products you can make the enrollment forms available for the user after paying for their

Woocommerce Uploads, 403 Errors & Permissions Read More »

Bug Fix: Yoast SEO and Woo Commerce Variation Swatches and Photos

I recently had a client ask me why they weren’t able to upload an image swatch using the Woocommerce variation swatches and photos plugin. Every time they tried to do it the page refreshed. It seemed to me like that the script that gets fired off when clicking the anchor ‘Upload Image’ wasnt firing. Here

Bug Fix: Yoast SEO and Woo Commerce Variation Swatches and Photos Read More »

Scroll to Top