facetwp leave all filters active across all pages, archives or single post

I will be quick and precise, I created a real estate site, I used the facetwp solution not very difficult to understand and with a rich documentation and hooks. I think I have everything in front of me but I need some help to understand which one. I’m still learning.

I put the links at the bottom.

the problem I can’t figure out which hook to use to basically tell facetwp to leave all filters active across all pages, archives or single post of properties , ignore post category, taxonomies, etc..do not auto-detect filters ,the header filters must remain the same everywhere

I have attached an illustration


How to Customize WordPress Archive Queries

80 hooks available wich one i can use ?

they talk about that too :" Instead of creating an entirely separate query, we recommend using WP’s pre_get_posts filter to modify the existing query."

update 26/10/2020

I updated the image to illustrate the problem.

I still haven’t figured out what to do.. I hope it’s clear and at least someone understands the problem.

enter image description here

Can an artificer cast spells using a single component from a set of artisan’s tools?

Under Tools Required

You produce your artificer spell effects through your tools. You must have a spellcasting focus – specifically tinker’ tools or some kind of artisan’s tool – in hand when you cast any spell with this Spellcasting feature. You must be proficient with the tool to use it in this way.

"Artisan’s tool" is singular. But it can refer to a set of objects.

For example:

Weaver’s tools include thread, needles, and scraps of cloth.

Weaver’s tools are an artisan’s tool but does an artificer proficient with them need to hold the needle, thread, and cloth in one hand to cast spells?

For example, the party has been striped of all their belongings but not their clothes. Can an artificer with proficiency in weaver’s tools tear off a scrap of their clothing and begin casting?

MySQL Transform multiple rows into a single row in same table (reduce by merge group by)

Hy, i want reduce my table and updating himself (group and sum some columns, and delete rows)

Source table "table_test" :

+----+-----+-------+----------------+ | id | qty | user  | isNeedGrouping | +----+-----+-------+----------------+ |  1 |   2 | userA |              1 | <- row to group + user A |  2 |   3 | userB |              0 | |  3 |   5 | userA |              0 | |  4 |  30 | userA |              1 | <- row to group + user A |  5 |   8 | userA |              1 | <- row to group + user A |  6 |   6 | userA |              0 | +----+-----+-------+----------------+ 

Wanted table : (Obtained by)

DROP TABLE table_test_grouped; SET @increment = 2; CREATE TABLE table_test_grouped SELECT id, SUM(qty) AS qty, user, isNeedGrouping FROM table_test GROUP BY user, IF(isNeedGrouping = 1, isNeedGrouping, @increment := @increment + 1); SELECT * FROM table_test_grouped;  +----+------+-------+----------------+ | id | qty  | user  | isNeedGrouping | +----+------+-------+----------------+ |  1 |   40 | userA |              1 | <- rows grouped + user A |  3 |    5 | userA |              0 | |  6 |    6 | userA |              0 | |  2 |    3 | userB |              0 | +----+------+-------+----------------+ 

Problem : i can use another (temporary) table, but i want update initial table, for :

  • grouping by user and sum qty
  • replace/merge rows into only one by group

The result must be a reduce of initial table, group by user, and qty summed.

And it’s a minimal exemple, and i don’t want full replace inital from table_test_grouped, beacause in my case, i have another colum (isNeedGrouping) for decide if y group or not.

For flagged rows "isNeedGrouping", i need grouping. For this exemple, a way to do is sequentialy to :

CREATE TABLE table_test_grouped SELECT id, SUM(qty) AS qty, user, isNeedGrouping FROM table_test WHERE isNeedGrouping = 1 GROUP BY user ; DELETE FROM table_test WHERE isNeedGrouping = 1 ; INSERT INTO table_test SELECT * FROM table_test_grouped ; 

Any suggestion for a simpler way?

Single “User-Only” Page with SMS Verification?

I am building a relatively simple site for a client and am hitting a wall when it comes to what seemed like a deceivingly easy request.

He wants one page of the site with important info to be only accessible to users who have provided a valid phone number in a registration form for easy followup later on. I have a couple ideas for how to build that functionality, but neither cover every base.

  • Use basic wordpress login/registration functionality and only allow logged in users to see the page. I feel as though sms verification isn’t an option as phone numbers aren’t stored via WordPress’s registration system.
  • Use Orion SMS OTP verification on a basic form hosted on the site. When the user verifies their phone number and submits the form, the password for the password protected private page will be sent via SMS to their provided phone #. With this one, I’m confused as to where I could store the user’s information for easy lookup later on. Would Twilio be an option? or Mailchimp?

Thanks for any advice you can send my way. I’m relatively new when it comes to WordPress dev.

Select arbitrary single value for GROUP BY: What’s the fastest option?

I have a query that I use to indicate locations in a map where there are overlapping points:

select     min(objectid) as min_objectid,     longitudex,     latitudey,     count(1) as count,     min(shape) as min_shape from     workorders group by     longitudex,     latitudey having     count(1) > 1 

In the mapping software that I use, I need to include columns like objectid and shape. For those columns, it doesn’t matter which of the grouped-by rows the values come from, just as long as there is a value.

Presently, I’m using min() to get an arbitrary value for those columns. However, I don’t know if that’s the fastest option since finding the minimum value would require calculation — and I wonder if that time spent is unnecessary.

What is the fastest option for getting an arbitrary/single value for GROUP BY in an Oracle query?

Does a Huntsman only exist for the span of a single dream?

In Changeling the Lost: Second Edition, it is said that a Huntsman’s heart resides within a Bastion. It even specifies that

the heart can found within the tempestuous mortal Bastion

So, the Bastion is one of a mortal dreamer. It is also said that

A Bastion only exists for the span of a single dream. When the dreamer wakes, whether naturally or because a paradigm shift jarred them awake, the Bastion crumbles and disappears

What happens when the Bastion containing the Huntsman’s heart crumbles? Does it destroy the heart, which implies that a Huntsman only exist for the span of a single dream? That would seem to contradict the "Wild Hunt" paragraph

so long as their heart beats in their stolen Bastion, they reform somewhere in the Hedge within a month’s time to start again. And even when the heart itself is destroyed and the Huntsman is no more, the animating Title’s fire flits back to the Keeper whence it came

It seems clear that the designers intended for the Huntsman’s existence to last longer than a dream, but the rules don’t seem to support that.

Does the True Fae move the heart to a different Bastion every night? That would seem very… tedious to do for one of the Gentry. It doesn’t really make sense to me.

So, how can a Huntsman exist for longer than a single dream?

Can a Monk use multiple Ki points to get more unarmed strikes from Flurry of Blows in a single turn?

In a recent session of 5e, our monk (4th lvl, way of Drunken Master) was using unarmed strikes, and the DM claimed that she could use any number of available Ki points to increase the amount of unarmed strikes granted by Flurry of Blows by an equal amount(spend 1 point to make 2 strikes, spend 2 points to make 3 strikes, etc.). I argued that since the Furry of Blows text says you can make two unarmed strikes as a bonus action, only one Ki point could be spent on this specific feature per turn. By RAW, how many strikes can be made in a single turn using this particular feature?

What is the ideal way of emulating a full dice set using a single d20?

Imagine you are trapped in a post-apocalyptic world and only have a single d20 at your disposal, nothing else whatsoever. What is the ideal way of emulating all other common dice types (d4, d6, d8, d10, d12, d%) using just this d20 and arbitrarily complicated math?

I realize there’s an easy way to make due with a single d6 (using the same d6 also for a coin-like mechanic), but I was wondering if this also works with a d20, and what the criteria are for this to work with a dN, if there is any research on the matter.

Let me preface this by defining a few pointers:

"ideal" = as few d20 rolls as possible.

"emulating" means mapping output from one or more d20 rolls to whichever die you want to emulate, while maintaining statistical accuracy – each possible output for the desired die must be equally likely.

"to map" a number X to an interval [1; B] means to apply an operation of the following form:

dB = X – B * int[(X – 1) / B]

where the int[] operation demands rounding down (truncation, since the argument will never be negative for the given problem).

Here’s what I have so far, in order of complexity:

Single roll X: d10 = [X] if [X <= 10], else: [X – 10]

Single roll X: d% is equivalent to d10.

Single roll X: d4 = X – 4 * int[(X – 1) / 4]

Two rolls X, Y: d8 = [X] if [X <= 8], or [X – 8] if [9 <= X <= 16]. Alternatively, for [X > 16], d8 = [Y] if [Y <= 8], or [Y – 8] if [9 <= Y <= 16]. Alternatively, if both [X > 16] and [Y > 16], d8 = [X – 16] if [X+Y] = even, else: [X – 12].

Three+ rolls X, Y, Z: d6 = X – 6 * int[(X – 1) / 6] if [X <= 18]. If not, check the same for Y. If not, check the same for Z. If {X, Y, Z} in {19, 20} (which has a 1/1000 chance of happening), map the combination to [1;6]. However, I don’t think it is possible to reliable get this mapping even when adding more and more dice rolls. Of course, it will get vastly unlikely rather quickly, but there does not seem to be a reliable way of using binary values to map to 6 reliably, seeing as it is a product of two primes. What is the lowest number of dice rolls required to achieve a 100% successful outcome, if it is possible at all?

The same issue applies to the d12, which can be constructed trivially from a d6 by rolling a d20 like a coin toss, then either using the initial d6 value or d6+6. This might not, however, be the ideal solution for this.

I would greatly appreciate any insight into the matter, as this has kept my mind busy for quite some time now. I’m pretty sure it cannot be reliably done for the d6 and d12, but I would appreciate any kind of closure or proof you peoples might be able to provide!

WordPress + Vue — Single page app giving me 404s when I use query params

I’ve got my rest api powered site working really well with Vue. Except for the issue of WordPress and urls.

Site: http://mytely.ca/

Search for a name or click on a name and the url updates. Now refresh the page. Everything still works, in that Vue will take over and do all the requests and set things up. But I’m getting a 404 on every page like that.

I don’t really know anything about this whole thing. I tried setting up a redirect plugin but that does what it says — it redirects from http://mytely.ca/&page=1&search=John%20Doe back to http://mytely.ca, which isn’t what I want.

I basically want WordPress to ignore the urls completely — just have index.php (and hence Vue) takeover everything. Basically, not 404 and just pass on through with the url.

I’m not currently using Vue Router at all in my app — just appending query strings and using popstate. I’m wondering if I actually need to be using Vue Router to handle this.

Match two distinct values from a single column in a joined table

I have three tables:

class: class_id class_name  student: student_id student_name  class_schedule: class_id student_id 

I want to select all the classes where studentA and studentB are in the same class using the student names. I can use a subquery to pull all the classes studentA is in, and then from that subset the classes that studentB is in and that works. That being said, it is terribly inefficient. I have tried a number of solutions including joining the same table twice, once for each value I want to find, but always get an empty result set.

For testing and prototyping purposes I am using sqlite, but will reside on DB2 long term.