Skip to content

Instantly share code, notes, and snippets.

@codingwithsara
Created August 14, 2018 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codingwithsara/41701d58f0bab1f20294a40785cbf251 to your computer and use it in GitHub Desktop.
Save codingwithsara/41701d58f0bab1f20294a40785cbf251 to your computer and use it in GitHub Desktop.
<url>
<loc><?= $url; ?></loc>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc><?= $url; ?>info</loc>
<priority>0.5</priority>
</url>
<url>
<loc><?= $url; ?>contact</loc>
<priority>0.5</priority>
</url>
<?php foreach($items as $item): ?>
<url>
<loc><?= $url; ?>items/detail/<?= $item->item_id; ?></loc>
<priority>0.8</priority>
</url>
<?php endforeach; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment