View Single Post
Old 09-25-2013, 03:35 AM  
gracesfall
Confirmed User
 
gracesfall's Avatar
 
Industry Role:
Join Date: Sep 2013
Location: Florida
Posts: 252
You could try something like this:

Create a page template for each letter of the alphabet (e.g. a-page.php, b-page.php, etc...). The loop on each page would look something like this:

PHP Code:
<ul class="posts">
         <?php 
         
global $wpdb
         
$request "a" [B]// could be any letter you want[/B]
         
$results $wpdb->get_results(
                
"
                SELECT * FROM 
$wpdb->posts
                WHERE post_title LIKE '
$request%'
                AND post_type = 'post'
                AND post_status = 'publish'; 
                "
         
); 
         if ( 
$results 
         {
            foreach ( 
$results as $post 
            {
                
setup_postdata $post ); 
                
?> 
                <li>
                    ... loop stuff here (the_title, the_permalink) ... 
                </li>
                <?php 
            
}
         } 
         else 
         {
            
?> 
            <div class="alert">No models found for that letter. Please try again, or use the search at the top.</div>
            <?php
         
}
         
?>
    </ul>
Then in your page manager, create a page for each letter and assign the corresponding page template to that page.
__________________
-= gracesfall =-

FreeLesbianPornBlog.com
Follow me on Twitter: https://twitter.com/gracesfall
Like me on Facebook: Free Lesbian Porn Blog
Hit me up on ICQ: 663050376

Domains for Sale: DaddyWhoreBucks.com | YoungAndFuckable.com | KnobGobblers.com
gracesfall is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook