This members-only tutorial provides the steps to display products on industry taxonomy term archives grouped by focus_area, another taxonomy whilst using Splide to arrange the products as a slider in Oxygen.

We shall get all the focus areas, loop through them, and for each write a couple of custom queries for pulling products that have been assigned the current taxonomy term (industry) and the current focus area in the loop.

Two custom queries are needed because we need to get a fixed number of products (8 in this example) for the slider w/o pagination and the second query is for getting the total number of matching products (shown next to the focus area heading in small text).

The above is a screenshot of example.com/industry/chemicals/ where chemicals is the industry taxonomy term for product CPT.

Conveying, Granulation / Sieving / Milling, Mixing Technology etc. are terms of focus_area which is another taxonomy for the product post type.

Step 1

Register Splide script so it can be enqueued later in the taxonomy term archive Template.

Install and activate My Custom Functionality plugin.

Connect to your hosting account using a FTP client and navigate to site's /wp-content/plugins/my-custom-functionality-master.

Upload splide.min.css to the plugin's assets/css directory.

Upload splide.min.js to the plugin's assets/js directory.

Edit plugin.php and add the following inside the custom_enqueue_files() function:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $399 one-time).

Already a member? Log in below or here.

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

You need to be logged in to view and post comments.
Not a member yet? Join here.
magnifiercross
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: