Tags By Letter
Posted: Sun Nov 22, 2020 2:35 am
Hi Guys,
I was wondering if someone would kindly show me how I can display Tags by the letter eg:
Tag Names: David, john, neil, Donald
If I want to display tags beginning with D to just show Donald and David,or tags beginng with J to display John, how would I go on with this?
I've read the docs and found this code in which I believe lists all tags in the websit.
<?php
foreach ($tags->keys() as $key) {
// Create Tag-Object
$tag = new Tag($key);
echo '<p><a href="'.$tag->permalink().'">'.$tag->name().'</a></p>'. PHP_EOL;
}
?>
thanks
I was wondering if someone would kindly show me how I can display Tags by the letter eg:
Tag Names: David, john, neil, Donald
If I want to display tags beginning with D to just show Donald and David,or tags beginng with J to display John, how would I go on with this?
I've read the docs and found this code in which I believe lists all tags in the websit.
<?php
foreach ($tags->keys() as $key) {
// Create Tag-Object
$tag = new Tag($key);
echo '<p><a href="'.$tag->permalink().'">'.$tag->name().'</a></p>'. PHP_EOL;
}
?>
thanks