Evostance
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Fixing WordPress
In reply to: Category Child Of not functioningSorry, I have basically got it too loop the child categories of a set parent. However I have 2 columns so need them to go in order say:
Category 1 – Col 1, Category 2 – Col 2, Category 3 – Col 1 etc etcI have got this to work, however it doesnt seem to pick the category up correctly
My full code is:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php $cats=array( 'child_of' => 4 ); $categories = get_categories($cats); ?> <div id="articles-left"> <?php if ($categories) { $numcategories = count($categories); for($i = 1; $i < $numcategories; $i = $i + 2) { $term = $categories[$i]; echo ' <div class="articles-post"> <div class="articles-posttitlebox"><a href="' . get_category_link( $term->term_id ) . '">' . $term->cat_name.'</a></div> <img src="/wp/wp-content/uploads/category-images-ii/'.$term->term_id.'.original.jpg"> </div>'; } } ?> </div> <div id="articles-right"> <?php if ($categories) { $numcategories = count($categories); for($i = 2; $i < $numcategories; $i = $i + 2) { $term = $categories[$i]; echo ' <div class="articles-post"> <div class="articles-posttitlebox"><a href="' . get_category_link( $term->term_id ) . '">' . $term->cat_name.'</a></div> <img src="/wp/wp-content/uploads/category-images-ii/'.$term->term_id.'.original.jpg"> </div>'; } } ?> </div> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?>
Forum: Plugins
In reply to: Page Cloud?Well, I have various pages that are all a child of say “number 6” so are children of “number 5” etc
I then have a list of pages that are children of number 6. However, they want it like a tag cloud so the more times one of these pages is clicked on it grows etc
Forum: Fixing WordPress
In reply to: Inserting latest blog posts of a static homepageThats what I thought.
Didn’t appear to work though :s
Viewing 3 replies - 1 through 3 (of 3 total)