I have a Page with Custom template. In this template I have index all posts of a category with many more modification. I know i can do this by creating Category specific template but this is different and I don't want to create category based template for every category.
Everything is fine but I'm trying to achieve post order by URL on this custom page template post. ASC order by URL working on Category page but not on custom page template.
- Example (with custom page) : http://www.projuktiteam.com/illustrator-tutorial/?order=asc (not working)
- Example (with category page) : http://www.projuktiteam.com/category/video-tutorials/illustrator-tutorial/?orderby=asc (working)
I also can order ASC the posts on this custom page from loop but i want to do this by URL. Because i want to provide user to sort the post by ASC, DESC, Title, Date etc.
<?php get_header(); ?>
<iframe class="featured-trailer" width="950" height="534" src="//www.youtube.com/embed/<?php echo get_post_meta( get_the_ID(), 'trailer', true ) ?>" frameborder="0" allowfullscreen></iframe>
<?php get_template_part('cat-featured'); ?>
</div><!-- end .carousel -->
ID, "tut-category", true); ?>
<div id="content" role="main"><?php ?>
<div class="loop-header">
<h1 class="tut-cat-title"><?php echo get_the_title(); ?></h1>
<div class="tut-cat-count"><?php echo 'Total Posts = ' . $category->count; ?></div>
</div><!-- end .loop-header -->
<?php
if (have_posts()) :
query_posts("category_name=$tutcatname&showposts=25");
get_template_part('loop-actions');
get_template_part('loop-content');
get_template_part('loop-nav');
else :
get_template_part('loop-error');
endif;
wp_reset_query();
?>
</div><!-- end #content -->