Support Forums - Classified Ads Script Osclass
Osclass plugin support => General plugins discussion => Topic started by: webcity on March 05, 2024, 01:48:24 AM
-
Hi,
I have the latest version of Sitemap Pro.
I wanted to change the priority to: 1.0 for the items xml. I have updated the function.php to
foreach($records as $r) {
$data[] = stm_create_link(osc_item_url_from_item($r, $url_locale_code), ($r['dt_mod_date'] <> '' ? $r['dt_mod_date'] : $r['dt_pub_date']), 'weekly', 1.0);
$data = stm_buffer_check($data, $file);
When changing the priority to 1.0 it shows as 1
<priority>1</priority>
I would like to show priority as 1.0
<priority>1.0</priority>
Can you please suggest the code to show as 1.0?
xml checker: https://www.mysitemapgenerator.com/service/check.html
Many thanks
-
In functions.php change
$text .= $tab . $tab . '<priority>' . $priority . '</priority>' . $eol;
Into:
$text .= $tab . $tab . '<priority>' . number_format($priority, 1) . '</priority>' . $eol;
-
Thanks,
That works great :-)