Thanks Greg. I have purchased the plugin and your solution worked a charm.
Please could you help with another problem I have had setting up the plugin. I think I have misunderstood the instructions!
I have added the following code to my product page:
<!-- DISPLAY COMMENTS -->
<?php
wsc_comments(array(
'tableOrTag' => 'die_adapters', // Section these comments are associated with, such as: "articles", "blog", "about_us".
'recordNum' => $record['num'], // Record num these comments are associated with, such as: $record['num'] or 1
'themeName' => 'custom', // HTML theme to display comments with, from /plugins/websiteComments/themes
'pageName' => $record['name'], // Page name displayed in comment notification emails, such as: $record['title'] or "Custom Text"
'pageUrl' => realurl($record['_link']), // Page URL displayed in comment notification emails, such as realurl($record['_link'])
));
?>
<!-- /DISPLAY COMMENTS -->
I have also added the following code to the head of my file. I assume this needs to be changed - and you have included it as a sample only - but after hours of head-scratching i can't work out what exampleRecords, exampleMetaData etc should be changed to.
// load records
list($exampleRecords, $exampleMetaData) = getRecords(array(
'tableName' => '_wsc_example_records',
'where' => whereRecordNumberInUrl(1), // If no record number in url just load first record
'limit' => '1',
));
$record = @$exampleRecords[0]; // get first record
if (!$record) { dieWith404("Record not found!"); } // show error message if no matching record is found
Jeff