![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Nov 2008
Posts: 106
|
WP/php question
I'm trying to list all the posts in a category alphabetically but the closest I've been able to get is
Code:
<?php wp_get_archives(type=alpha); ?>
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Nov 2008
Posts: 106
|
Thanks for the reply fris. Its looking like I'll just be hardcoding these links since the category will only be updated once a week and this is proving to be way above my skill level.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Dec 2007
Location: Ontario
Posts: 4,235
|
use <?php wp_list_categories('orderby=name'); ?> i think?
edit: or wait thats for categories (seemed so easy to cut and paste from the wp site that fris gave) <?php wp_get_archives('orderby=title'); ?> i usually just put stuff together till one of them works lol, good luck! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Nov 2008
Posts: 106
|
I'm actually trying to list the posts from a particular category in alphabetical order, not the category names.
I have a new site with a featured model category and on the page for the "Models" category (splackle.com/category/models/) I want an alphabetical list of all models I've added above the actual entries. I just went ahead and put the link in by hand since I'll only be updating that category once a week and it shouldn't be a big deal to add a new one for each post.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Dec 2007
Location: Ontario
Posts: 4,235
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,359
|
Quote:
Code:
<?php $my_query = new WP_Query('cat_name=models&showposts=50&orderby=title'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <a href="<?php the_permalink();?>"><?php the_title();?></a> <?php endwhile; ?>
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Nov 2008
Posts: 106
|
Woo thanks a ton guys, got it now.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Tube groupie.
Industry Role:
Join Date: Aug 2002
Location: LoScandalous, CA
Posts: 13,482
|
what does the output look like?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Join Date: Nov 2008
Posts: 106
|
Its the list at the top above the entries here: splackle.com/category/models/
I only have one post in the category so far but I added in a few dummy posts if you wanna check it out.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Tube groupie.
Industry Role:
Join Date: Aug 2002
Location: LoScandalous, CA
Posts: 13,482
|
i like it...you know thw caregories don't get much indexing usually, right?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Join Date: Nov 2008
Posts: 106
|
Yah its just there for anyone who ends up on that page through the link in the nav menu at the top or some other way to find what they're looking for easier.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Tube groupie.
Industry Role:
Join Date: Aug 2002
Location: LoScandalous, CA
Posts: 13,482
|
very cool
|
![]() |
![]() ![]() ![]() ![]() ![]() |