You are here:  » In Wordpress search results link directly to product URL

Support Forum



In Wordpress search results link directly to product URL

Submitted by Romac39 on Tue, 2012-05-01 08:51 in

Hello David,

As you can see here:
http://www.example.com/alle-aanbiedingen/?pto_q=vakantietype:stedentrips

I added a button instead of a textlink. Last thing I want to change though is to have this button centered underneath the description and have it link directly to the productpage of the merchant instead of to the product page on my site. I found simular tips on this forum how to go about this but not for Wordpress and PT. Can you tell me how to get this done?

Regards,

Robert

Submitted by support on Tue, 2012-05-01 09:12

Hi Robert,

In pto_search.php look for the following code at line 494:

    $each = str_replace("%PRODUCT_URL%",pto_common_productHREF($row),$each);

...and REPLACE with:

    $each = str_replace("%PRODUCT_URL%",pto_common_productHREF($row),$each);
    $each = str_replace("%BUY_URL%",pto_common_buyURL($row),$each);

With that in place, you can modify your Search Results / Each template (wp-admin > Settings > PriceTapestry.org) and use %BUY_URL% in place of %PRODUCT_URL%

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by Romac39 on Tue, 2012-05-01 09:40

Thanks David, Works like a charm!