Created
October 26, 2011 11:29
Revisions
-
lluisgerard revised this gist
Oct 26, 2011 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,8 @@ if( $cat_obj->parent ) { // CATEGORIA PARE / Parent category only while ( have_posts() ) : the_post(); ?> <?php // Controlem que sempre sigui una categoria pare / a parent has no parent $category = get_the_category(); if ($category[0]->category_parent == 0) : ?> -
lluisgerard revised this gist
Oct 26, 2011 . 1 changed file with 15 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,26 +1,28 @@ <?php $cat_obj = $wp_query->get_queried_object(); ?> <?php if( $cat_obj->parent ) { // CATEGORIA FILL / Child category only while ( have_posts() ) : the_post(); ?> <?php include('post.php'); ?> <?php endwhile; ?> <?php } else { ?> <?php // CATEGORIA PARE / Parent category only while ( have_posts() ) : the_post(); ?> <?php // Controlem que sempre sigui una categoria pare / a parent has no parent $category = get_the_category(); if ($category[0]->category_parent == 0) : ?> <?php include('post.php'); ?> <?php endif; ?> <?php endwhile; ?> <?php } ?> -
lluisgerard created this gist
Oct 26, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ <?php $cat_obj = $wp_query->get_queried_object(); ?> <?php if( $cat_obj->parent ) { ?> <?php // CATEGORIA FILL / Child category only while ( have_posts() ) : the_post(); ?> <?php include('post.php'); ?> <?php endwhile; ?> <?php } else { ?> <?php // CATEGORIA PARE / Parent category only while ( have_posts() ) : the_post(); ?> <?php // Controlem que sempre sigui una categoria pare / a parent has no parent $category = get_the_category(); if ($category[0]->category_parent == 0) : ?> <?php include('post.php'); ?> <?php endif; ?> <?php endwhile; ?> <?php } ?>