1clickmoviescom
Forum Replies Created
-
Forum: Themes and Templates
In reply to: How do you make a custom, yet dynamic homepage layout??Thank you for the reply.. I’ve been working on it, and seem to have something very workable.. but, for some reason, the list of articles for each category, are all the same :O
So, the categories are showing properly, three columns wide.. but the list under the content of each categories most recent article are all the same..
Here is the code I am using:
<style media="screen"> .cats {width:33%;float:left;min-height:350px;} .cats img {width:200px;} </style> <?php if (is_home() || is_front_page()) : $cat_args = array( 'orderby' => 'name', 'order' => 'ASC', 'child_of' => 0, 'hierarchical' => 1 ); $categories = get_categories($cat_args); foreach($categories as $category) { echo '<div class="cats">'; echo '<h3> <a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a></h3>'; $featured_args = array( 'numberposts' => 1, 'category' => $category->term_id ); $featured = get_posts($featured_args); foreach($featured as $feature) { ?> <span><?php the_content(''); ?></span> <?php $post_args = array( 'numberposts' => 5, 'category' => $category->term_id ); $posts = get_posts($post_args); echo '<ul class="cat_recent">'; foreach($posts as $post) { ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php } // end posts echo '</ul>'; } // end featured echo '</div>'; // end .cats } echo '<div style="clear:both">?</div>'; endif; ?>
Not sure why the lists items are all the same.. ??
Any ideas on this one??Forum: Themes and Templates
In reply to: How do you make a custom, yet dynamic homepage layout??As a side note, if someone can help me with the proper loop coding (I’m comfortable coding in PHP, I’m just not familiar with the intricacies of WP codes yet..
The loop could look something like this:
Foreach category,
echo most popular article content,
echo list of 5 most recent articles in this category
end loopI can then insert the HTML/CSS to format this in the way the site needs..:)
Thanks!!
Forum: Plugins
In reply to: Getting tags for a topic functionI’ve just found this one:
the_tags('<ul class="tags"><li>Tags: </li><li>',',</li><li>','</li></ul>');
BUT, I am now searching for reasons why it is showing tags from other post, instead of the post being viewed !! LOL