cftp / facetious Goto Github PK
View Code? Open in Web Editor NEWFacetious lets you add a faceted - often called an 'advanced' - search form to your WordPress website.
Facetious lets you add a faceted - often called an 'advanced' - search form to your WordPress website.
We are getting the following error in our logs from Facetious queries:
Dec 3 02:43:46: WordPress database error Column 'post_date' in where clause is ambiguous for query SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) LEFT JOIN wp_posts AS p2 ON (wp_posts.post_parent = p2.ID) WHERE 1=1 AND ( ( YEAR( post_date ) = 2012 AND MONTH( post_date ) = 10 ) ) AND ( wp_term_relationships.term_taxonomy_id IN (30) ) AND wp_posts.post_type IN ('post', 'report') AND ((wp_posts.post_status = 'publish') OR (wp_posts.post_status = 'inherit' AND (p2.post_status = 'publish'))) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10 made by require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts
Harry @ DXW suggested the error is generated by line 262 in template.php:
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
but looking again now I'm not sure that really matches what we're seeing in the error - it looks like its generated by the main query that Facetious constructs.
Is it possible to implement the ordering of the facets (fields) in the Widget? -- Or if used via template tags?
Currently it pulls a list of taxonomies but I need that in a different order on the frontend. How could I do that?
Thanks!
Should Facetious use 301 rather than 302 URLs for the redirects? Discuss.
From the top of my head:
Pros
Cons
Would be nice to be able to pass a bunch of query args into a function and get the Facetious URL to use in a template. (Currently I'm linking to the query arg style URL, and using the redirect.)
Add an argument to the fields
array which causes the display of a dropdown of post types. You should be able to specify which post types to display.
See 508a034
Any objections?
The fields in the Facetious widget aren't presented very nicely in any of the bundled themes. We should add a rule that targets the fields in the Facetious widget and adds some basic styling to them (probably just display:block) so they align more nicely.
I'm using this plugin in a web page, but it does not give me correct results... It gives me all results.
Any idea?
Hello,
After enabling buddy press on one of my sites the facetious search stops working.
WP 3.9.1
BuddyPRess 2.0.1
Facetious Search 1.1.4
Using the widgets or short codes and hit search, I see the URL changes to the facetious parameters for a second then its redirected back to the home page.
I also posted this to the WP support forum for the plugin.
WordPress is treating the search as though it were a post type archive, but choking when this isn't the case.
Example URL to cause the issue: http://nao.simonwheatley.co.uk/search/type/report/sector/children-and-families/
This could be because is_search
isn't set to true on WP_Query
when the search keyword isn't present.
URL could be something like /search/taxonomy-name/any/
. Though we need to bear in mind the fact we might have a term called any
.
Please, add in the plugin template next:
Hi guys,
Great plugin, i am trying to fill the pt field with posts instead of custom post types this is the code i currently have:
'events', 'posts_per_page' => -1 )); ?> <?php foreach ($events as $event){
$eventarray[$event->post_name] = $event->post_title;
} ?>
<?php // print_r($eventarray); ?>
<?php do_action( 'facetious', array(
'submit' => 'Search',
'fields' => array(
'pt' => array(
'label' => 'Event',
'options' => $eventarray,
'all' => 'All Events'
),
's',
'talk_type',
)
) ); ?>
This only prints out the search field and the taxonomy field called talk_type, it doesn't echo anything out for the pt field even though there is an array there?
Also another question am i able to search custom fields? or is there anyway i can make it search custom fields?
Regards
Nathan
So far i'm really loving Facetious. For some reason I can't get permalinks to work. I'm using do_action( 'facetious', array(... to display the search/filter in my template. Do you have example code to get this to work? Or is it supposed to just happen?
You can see a working example of 1 of the sites in question here:
http://www.superstuffpartyrental.com/tent-layouts/
btw, On a new site, I've tried using
$url = get_facetious_url( array( 'post_type' => 'pt_maids', 'age' => 'nationality' ) );
with no luck. I think i'm just confused on how the url functions are supposed to work.
Currently I have such URLs when using the faceted search:
search/keyword/aroma/type/product/
---> I would need that translated, in my case into German, then I would have the above as:
suche/schluesselwort/aroma/typ/product/
so, the following would need translation:
"search"
"keyword"
"type"
In this example above, I doubt that the post type ("product") could be made translateable too? Would be awesome, but I have no idea other than to use/map the lower case string of the singular post type label?!?
---> for me personally the tweaking via a language file (.pot/.po/.mo), or a filter would be enough. However I could also see some benefits for a global setting, or on a per widget basis, or via template tags.
What do you think?
Is it possible to implement that in the translation files and/or making those slug parts filterable?
Thanks!
-Dave :)
It would be good if you could hook into the woocommerce page title so when a search has been performed it doesn't just have double quotes with no search query in it.
I've managed to replace the dropdowns with groups of checkboxes, but it works fine only if I choose 1 checkbox for taxonomy.
If my url is something like
"mysite.com/?facetious_post_type=products&rivestimento=trasparente&performances=antincendio&performances=antisismica&destinazione=corporate"
the result is obviously incorrect.
Any suggestion to get the right query?
Provide something more sensible than Search results for ''
when Facetiousing with no keywords. Occurs in Breadcrumb NavXT.
Should make it easy to extend for other breadcrumb plugins.
Perhaps hook the filter in get_search_query
?
We should stick a header image on the plugin page at http://wordpress.org/extend/plugins/facetious/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.