custom php file to display posts in descending and ascending order?????
-
my site: ampersandbox.net
If you go to the site on the right column you will see a “sort all by” section I need 3 functions.
- newest – will generate page that lists that displays posts from new to old
- random – will generate page like newest but in a random order.
- featured – will do same as above but of a list picked by admin … i have a plugin that allows me to generate a list of links but thats about it. its called by using `
<?php featuredpostsList(); ?> `
so basically by default most wordpress themes does exactly what i need for the newest feature but I have switched index.php to do something else…but i still need that default function. So I assumed i could make a custom php file called SORT.php and paste the old default code that was in index.php which is…
<?php global $options; foreach ($options as $value) { if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_option( $value['id'] ); } } ?> <?php get_header() ?> <div id="container"> <div id="content"> <?php thematic_navigation_above();?> <?php get_sidebar('index-top') ?> <?php thematic_above_indexloop() ?> <?php thematic_indexloop() ?> <?php thematic_below_indexloop() ?> <?php get_sidebar('index-bottom') ?> <?php thematic_navigation_below();?> </div><!-- #content --> </div><!-- #container -->
however i cant link to this page or get it to work…. please help! thank you!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘custom php file to display posts in descending and ascending order?????’ is closed to new replies.