Alphabet pagination (2 posts)

  1. lapman17
    Posted 4 years ago #

    Hey everyone,

    Everything I have learned about php and development I have taught myself, I am novice at best. I am just spinning my wheels and could really use some help.

    The situation:

    I have a page that is reading the categories and returning all results equal to "games".

    The problem is, I have this code:

    <?php $alphabet = range('A', 'Z');
        foreach ($alphabet as $letter) {
        echo '<a href="' . $_SERVER['PHP_SELF']
            . '?letter=' . $letter . '">' . $letter . '</a>';
        <?php $_GET["letter"]; ?>

    I want the same page to reload with just the A results....or the B results...what am I doing wrong? I am sure my code isn't pretty...so I apologize ahead of time.

    Do I need to make separate pages in WordPress for each letter? I would hate to have to do that.

    Any help would be greatly appreciated.

  2. lapman17
    Posted 4 years ago #

    I should have added that right now when I click say letter "A" it takes me to my homepage.....when I just want it to reload the page and display only the "A" titles.

Topic Closed

This topic has been closed to new replies.

About this Topic