There could be a number of ways probably. I’d def go with popping an AirpressQuery somewhere in your theme’s page template.
Something like this:
if (isset($_GET['artnr'])) {
$query = new AirpressQuery();
$query->setConfig("Test config");
$query->table("Table X");
$query->addFilter("{Article nr}='".$_GET['artnr']."'");
$result = new AirpressCollection($query);
foreach ($result as $key => $prod) {
echo "<div>";
echo $prod['Art nr'] . $prod['Product Title'] . '<img src="' . $prod['Product Pictures']['0']['thumbnails']['large']['url'] . '">';
echo "</div>";
}
}
Of course you do need an identifier to reference to the right Airtable record. In this example I’m getting it from a url parameter, but that’s not a common approach. But from that identifier I’m just fetching the right record and then its thumbnail image.
Of course I’m not sure how your Airtable or WordPress pages are set up, but something like this should work well.
-
This reply was modified 4 years, 11 months ago by
tomzorz.