Filter listings

Has anybody got examples of how one would go about creating a multiple choice checklist type filter choice for returning listings based on combinations of custom field values or categories (I'm flexible on how it is acheived right now).

I have custom fields being returned in listings using Search Everything plugin, but would just like multiple options to be selected at once rather than one single search query.

  • BlueHorizons
    • Flash Drive

    Thanks for the links Kimberly, I have looked them over and tried several plugins from them.

    The problem I am getting is that Search Everything does a great job of allowing Wordpress search feature to return single queries including the values of custom fields. However, the plugins I have tried don't search as far as the custom field values ... Taxonomy Drill-Down widget is as close as I got, but as I say, if I start clicking through nested listing categories and then use something like Taxonomy Drill-Down, it resets the query and excludes the queries that makes up the category and subcategory listing position from which the search is made.

    I just want to be able to build search queries similar to how PC World does for example: http://www.pcworld.co.uk/gbuk/apple-desktops/706_7027_70027_xx_BA00002934-BV00196163/1000-1300-criteria.html

    Where the user selects the main category to delve into the listing, then from there the appropriate custom fields can be used together to make more specific (filtered) search queries.

    Anybody have any other ideas?

  • BlueHorizons
    • Flash Drive

    I tried a vew plugins now which allow tags and categories to be filter values, but they don't return content back when clicked on. I'm guessing there is a conflict with Directory listing template somehow? Listing categories work, but not tags or other micro meta content such as custom fields as I want. Almost seems like plugins that should work are serving the Listing texmplate error ... might have to see if setting the website to default theme can prove this.

  • BlueHorizons
    • Flash Drive

    I think the problem relates to a general issue I am having with Directory plugin: https://premium.wpmudev.org/forums/topic/listings-url#post-182861

    I have to keep jiggling with the permalinks when I make changes in my Wordpress customizations ... generally changing Directory template files and Directory listing posts. But it could be a general setting problem or who knows ... can't be sure right now, but it still happens. Really throws me off as some functionality I have been trying to get working wasn't, then by accident a listing didn't display which I found to be odd, so I thought I'd jiggle the permalinks and low and behold, the listing page appeared but a feature I couldn't get working started working.

  • Kimberly
    • Champion of Loops

    BlueHorizons

    So playing with the permalinks solves your issue? Have you tried custom permalinks?

    Are you having to reset them each time?

    I dug through the WP repository and found there were a couple that might suit you but you can never guarantee any plugin compatibility when coming from different developers unless they are coming from the same group (i.e. wpmu devs)

    Have you tried the default theme?

    What problem are you having now? Just issues with the search returning what you want?

    Best,

    Kimberly

  • BlueHorizons
    • Flash Drive

    Hi Kimberly,

    I did try changing to the default Wordpress theme but before I went about re-inserting alot of code and tags in order to test things, I noticed that the Listings template disappeared from the Themes list and couldn't go back and restore (luckily I had made a backup).

    Needless to say these kinda issues are costly with time, so am sticking with the quirks of my default Directory theme backup for now.

    As for problems, nothing is misbeahing right now. So I'm just goign to finish populating my data and flesh out the templates and features some more and will report back if I notice anything break again.

  • BlueHorizons
    • Flash Drive

    Got my first break.

    1. I had permalinks set to Day and name.
    2. Had a listing open in the browser.
    3. Changed checked value for comments type property (CustomPress).
    4. Reloaded the listing that was open in step 3, but page didn't load.
    5. Changed permalinks setting in step 1 to anything else, then reset to Day and name.

    This is the kinda thing I was getting. Will try and post steps as I find them so that we can get to the bottom of this, as it cna be really confusing when you start developing a site for pages to suddenly not load.

    Edit: Just noticed the sub category page is not being found (or rather the content). Just the index page content and actual listing page content.

  • BlueHorizons
    • Flash Drive

    Follow up.

    Despite working prior to the property type change, the Day and name permalinks no longer work for sub category pages, as the content will not be found. Changing the permalinks to something else like Month and name now makes the sub category page content work!? Super annoying.

  • Kimberly
    • Champion of Loops

    BlueHorizons,

    I can imagine it's frustrating!

    I can't remember where but I was reading something about permalinks "good practice" and it talked about using permalinks without numbers at the end. Sites with with lots of content, especially categories, subcategories etc, could be negatively affected by that. I think it has something to do with the url conflicting with numbered pages... It's a Wordpress anomaly or something of that sort.

    For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields. The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text “page slug” as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties). So, it is best to have at least two path segments in your post’s permalink structure such as /%year%/%postname%/ or even /posts/%postname%/.

    The Codex has some great suggestions for how permalinks, and changing permalinks for that matter, affect your htcaccess file.

    Perhaps you'll find it useful? http://codex.wordpress.org/Using_Permalinks

    If you've found a workable fix, feel free to close the thread. If you think this is a Directory specific issue then I'll see about getting someone more acquainted with the code and post structure to stop in. :slight_smile:

    Best,

    Kimberly

  • BlueHorizons
    • Flash Drive

    Hi Kimberly,

    I've kept the post open as I have yet to fix the problem satisfacturally. I will look at the htaccess too, though I suspect it is a weird cache anomily rather than a problem with conflicting permalinks (I've only got two different listings afterall, so this is a very small database right now).

  • BlueHorizons
    • Flash Drive

    Hey Clifford, there are third party tools (as I have been finding - read higher up this thread) but I think the current Directory theme breaks most of them. I think with the proposed changes to remove Directory theme dependence, the bigger world of Wordpress plugins should work better with Directory. Still waiting confirmation on when the new version is expected to appear though ....

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.