You are here:  » Question about: [pto search="Keywords"] and currency

Question about: [pto search="Keywords"] and currency

Submitted by Petri78 on Wed, 2020-04-15 06:32 in

Hi David,

I did try to find answer from this forum and i did found few, but they were old posts and did not work for me.

So here are the questions:

Is there a way to use negative keywords?

Example: I want show dewalt drills

If i use shortcode [pto search="dewalt drills"] it will show all delwalt products and also other drills, like: bosh drills and panasonic drills.

If i could use negative keywords, i could use shortcode like this: [pto search="+dewalt +drills -bosh -panasonic"]

Can this be done?

Other question:

In my PT installion i have set currency after the price, but in Wordpress currency is still before the price.

So where i can change the currency to show after the price?

- Petri

Submitted by support on Wed, 2020-04-15 06:49

Hi Petri,

One option would be to add brandFilter support to the search shortcode which is straight forward to apply. To try this, edit pto.php and look for the following code at line 770:

    if (isset($atts["maxprice"])) $pto_maxPrice = $atts["maxprice"];

...and REPLACE with:

    if (isset($atts["maxprice"])) $pto_maxPrice = $atts["maxprice"];
    global $pto_brandFilter;
    if (isset($atts["brandfilter"])) $pto_brandFilter = $atts["brandfilter"];

Then you could use the shortcode e.g.

[pto search="drill" brandFilter="DeWalt"]

However, if you think a boolean mode search (supporting +include -not_include) would be more flexible just let me know.

Regarding price / currency order, there is an alternative placeholder you can use - throughout the templates (wp-admin > Settings > the prices are displayed using;


...instead use:



Submitted by Petri78 on Wed, 2020-04-15 10:28

Hi David,

Currency order is now solved. Thank you!

I did make those changes in pto.php file.

After that i did try this shortcode: [pto search="akkuporakone" brandFilter="Makita"] but it still shows also other brands.

Submitted by support on Wed, 2020-04-15 10:44

Hi Petri,

Ah sorry about that - WordPress makes all $atts lowercase. I've corrected the modification above; with that in place now use shortcode e.g.

[pto search="akkuporakone" brandfilter="Makita"]


Submitted by Petri78 on Wed, 2020-04-15 12:20

Hi David,

Ok, now it works fine. Thank you!

One more question regarding this:

Is it possible to search more then one keyword?

Or is something like this possible?:
[pto search="keyword1,keyword2,keyword3" brandfilter="Makita"]


Submitted by support on Wed, 2020-04-15 12:41


Multiple keywords (no need for commas) should work fine as long as the query triggers a FULLTEXT index; that is all keywords are > 3 characters and not MySQL stop words however if you're getting no results because of the basic search method being triggered let me know and I'll check it out further with you...