Saturday, June 22, 2013

[Help Wordpress] Category.php


Category.php



But I use one code for all my categories.
Like this, in my category.php:
  $category = get_category( get_query_var( 'cat' ) );
$cat_id = $category->cat_ID;
   $the_query = new WP_Query(array(
    'cat' => $cat_id,
    'posts_per_page' => 5 ,
    'offset' => 1
    ));
   while ( $the_query->have_posts() ) :
   $the_query->the_post();
  ?>


With this tutorial, I need to create a lot of slider, select the category one-by-one. But I need only one slider to get the category of page...



.

help.dimsemenov.com

No comments:

Post a Comment

Search

Other post

[Help Wordpress] How to insert Post Link to Image
Help Wordpress
How to insert Post Link to ImageHello, my current settings is:      {{image_tag}}         ...
[Wordpress issuses] vannapragal on "Gifs not displaying properly in Random Posts."
vannapragal on "Gifs not displaying properly in Random Posts."
vannapragal on "Gifs not displaying properly in Random Posts."The image looks fine in the ...
[Help Wordpress] Struggling to add custom skin
Help Wordpress
Struggling to add custom skinHi there,I have been reading http://help.dimsemenov.com/kb/wo...
[Help Wordpress] Slider from posts removes paragraph tags
Help Wordpress
Slider from posts removes paragraph tagsI had the same issue - using a custom twentyten ch...
[Help Wordpress] Slider Stopped Responding.
Help Wordpress
Slider Stopped Responding.Hey Guys,Amazing piece of software which has worked flawlessly u...