This is the second time I've presented this talk, but the first time at a WordCamp. Rather than the screenshots in the slides, I did a live demo which has been captured on video and will be posted to WordPress.tv
2. Agenda
About me
How to organize your facets
Tools used in creating this presentation (and some others I learned about
along the way)
Importing data and setting it up for success
Setting up and implementing facets
Try it out!:
http://wilt.rocks/events
Shanta R. Nathwani - @ShantaDotCa - http://shanta.ca 2
3. About Me
• Instructor, Sheridan College
• Joint program with University of Toronto at
Mississauga: Institute of Culture,
Communication, Information and Technology
• Web Design and Capstone Project
• Independent Consultant, Web Weapons
• Clients include NPOs, Real Estate, Software
Development, Financial and Political Sectors
• Bachelor of Commerce in Info Tech Mgmt.,
Ryerson University
• Serial WordCamper. Went to 7 last year and
crowdsourced my tour this year for 7 more
and hoping to do WordCamp Mumbai 2016.
• Co-organizer, WordCamp Hamilton and
Toronto 2015
Shanta R. Nathwani - http://shanta.ca - @ShantaDotCa 3
4. Big Thank You!
Becky Davis Justin Howe
Shawn PucknellShanta R. Nathwani - @ShantaDotCa - http://shanta.ca 4
5. Disclaimer
• Please excuse all the text
and screenshots. I’m used to
using this for my students,
but they make great notes!
• I’m going to upload these
after the session to
http://shanta.ca, so you
don’t have to write this all
down.
• Please ask questions! I’ll try
and add them to the slides
after the fact.
6. Information architecture and knowledge
There are two ways of looking at how people find information: when someone
is knowledgeable about a topic, and when someone doesn’t know much about
a topic.
If someone is knowledgeable about a topic, they can follow a trail of
breadcrumbs (such as a menu) to lead them to the right place.
If someone is less knowledgeable about a topic, or there are large pieces of
information, it is easier to narrow or filter down the results.
Shanta R. Nathwani - @ShantaDotCa - http://shanta.ca 6
7. Amazon.ca
Search by:
• Title
• Author
• Genre
• Price
• Department
• …and so much more!
Shanta R. Nathwani - @ShantaDotCa - http://shanta.ca 7
Examples of Faceted Searches
8. Expedia.ca
Filter by:
• Price
• Number of Connections
• Airline
• Departure/Arrival time of day
• Length of Flight
• …and so much more!
Shanta R. Nathwani - @ShantaDotCa - http://shanta.ca 8
Examples of Faceted Searches
9. FacetWP
Premium Plugin for WordPress
Cost is $79 for 3 sites, $199 for unlimited sites. Both are per year and include
service and updates.
http://facetwp.com
Shanta R. Nathwani - @ShantaDotCa - http://shanta.ca 9
10. No WordPress Installations Were Harmed
Importing:
For the demo today, I used WP All
Import (the free edition) for XML
data. The paid edition allows for
importing and placement of
Advanced Custom Fields as well as
images.
I also explored and tested WP
Ultimate CSV Importer for CSV
files. Out of the box, it will import
into all of the standard stuff, as
well as the Advanced Custom
Fields.
Other Goodness:
To keep testing the imports, I had to
keep deleting and re-creating posts. I
used Bulk Delete that did the job
amazingly. It will also delete
selectively.
To do restores, I use Backup Buddy
because it is so easy to use. This is a
premium plugin, but they have
wonderful packages for educators
and students.
I used the City of Toronto Festival
Open Data set (XML format)
Shanta R. Nathwani - @ShantaDotCa - http://shanta.ca 10
This is a fairly new topic for me, so I would appreciate questions and feedback.
Hoping to get to Pune!
Becky Davis for giving me the idea to do this talk. Justin Howe for helping me figure it out. And of course to Shawn Pucknell, for getting me to push my envelope.
And yes, I am a samurai, because samurai are cooler.
Jump to Amazon.ca and search for Dragons
Jump over to the demo!
Here, I’ve chosen to import the data into posts. You can input them into pages, Custom Post Types and more! I’ve input the name of the event into the title. The long description, website and major intersection into the body of the post here from the original import data on the right side.
Further down, I’ve put the type of the event into the category, and the location or region in tags. Ideally, under a regular instance, you would probably put every import item into a single field since each will become a facet later. If you need to import numerous tags, that’s fine, just don’t use them as a facet later on like I’ve done in my example.
Lastly, for this example, I’ve set up random dates from last December to now so that they would all be published. You can import and place whatever fields you like. For my purposes, I only used the built in features in WordPress, no custom fields.
After I imported 773 records, this is what it looked like.
Got to FacetWP, hidden under “Settings” in the dashboard. I’m using Option 2 here, and using the default template.
As you can see, there are plenty of facet types. Many of these you might see on sites where you might search for flights and hotels, such as the “slider”. You can use checkboxes, which is probably the most common, or a date range, such as the one I used for this demonstration.
I’ve called this Facet “Location”. I’m making it a checkbox and pulling this from the tags as the data source. Remember that for this example, I only had one tag per post. If you are going to create a facet, make sure that you only have one TYPE in your field. I don’t recommend making it tags, since WordPress recommends 5-7 tags per post. I used categories for the type of event as well and used random dates as the publish dates. You can use Advanced Custom Fields if you like!
FacetWP adds one database table: facetwp_index. This table contains all the information needed to generate the facets. When the “Re-index” button is clicked, FacetWP loops through every post on your site and indexes the values for each facet. - https://facetwp.com/documentation/how-facetwp-works/ After you save each facet, have it re-index the database.
Once you have finished creating your facets, jump over to the Facet Template. Remember, this is not the page on which you will be creating your interface, this is the “results” piece. I’ve chosen the default one here.
As you can see, you can change what is displayed. I’ve left it alone.
Copy the shortcodes from the templates and the facets…
I’ve created a page called “Events”, but you can put this wherever you wish. Here, I’ve used the shortcodes from the facets and used those as the filtering “devices”. Then, where I want the results to show, I’ve placed the facet template. I’m using the default facet template.
It’s not pretty here, but you can see the results using a dropdown menu, a checkbox option and a date range. Below are ALL of the items, no filtering.
When I click on the arrow beside “Event Type”, we see all of the possible choices and how many results are in each of those categories. In my import, not all of the entries had an “Event Type”, but that is an issue with the originating data.
Notice when I click on “Film” not only do the final results change, but so do the other filters that could be applied.
And when I click on the “Downtown” option, the results are filtered down even more so not only at the bottom, but also in the “Event Type” at the top of the page.
When I click on the last item on the list, I am brought to the resulting post in WordPress that I originally brought in. Again, this is a really simple example, but there is so much that could be done, it would be impossible to show it all here.