I am creating a site using search_external.php showing on a wordpress site.I am trying to bring the merchant name as a variable, which comes from a custom field in wordpress.
Custom field = "Merchant Name", I would like to then show products using merchant:Merchant Name as the search term. I have also added a check to see if the store name exists otherwise nothing will show.
I do not believe I have got my variable correct - any ideas?
<?php if( get_field('store_name') ): ?>
$variable = "Merchant Name";
$external_baseHREF = "http://www.example.com/store/";
$external_path = "/home/example/public_html/store/";
$_GET["q"] = "merchant: $variable";
<?php endif; ?>