How to make a glossary of terms

Skint

New member
Aug 16, 2010
163
0
0
Hi

I have a wordpress site and I plan on creating a glossary category, and using a redirection plugin I'm going to post the glossary and redirect the category to the post, so user clicks on GLOSSARY and goes to GLOSSARY POST.

Right, that's sorted. But the actual glossary - I need it so that there's A, B, C, D, E etc and the user can just click on one of the letters and get sent straight down the page to where the appropriate terms are. So, if the user clicks on F, they get sent to terms that begin with F, you get the picture.

I'm guessing this is javascript, right? I'm a noob, how do I sort this out? Is it easy?

Thanks!
 


You could do it in php:

Before page output, make your navigation list <a href="#A">A</a><a href="#B">B</a>...

Then, sort the data; loop through it, so the first 'A' term you find, wrap it with <a name="A">A term</a>, the first 'B' term, <a name="B">, ... <a name="Z">
 
You could do it in php:

Before page output, make your navigation list <a href="#A">A</a><a href="#B">B</a>...

Then, sort the data; loop through it, so the first 'A' term you find, wrap it with <a name="A">A term</a>, the first 'B' term, <a name="B">, ... <a name="Z">

How is that php? It's just HTML?

Anyway, I just tried this and it's exactly what I was looking for! Thanks man.
 
LOL I meant <?php echo '<a href="#A">A</a><a href="#B">B</a>';?>

Glad it worked for you.