Ask your WordPress questions! Pay money and get answers fast! (more info)

Need someone to build me a snippets area WordPress

  • SOLVED

Hi I am not good with php and am trying to build a snippets section like this http://my.studiopress.com/snippets/. Can someone please help me build something like this? I am not sure how to go about it. I would prefer if you wrote the code and then explained it to me. That way its fastest.

Answers (2)

2013-08-03

Sabby Sam answers:

Hi,
I can help you. My skype Id is sabiresm and my gtalk id is sabirsoftware@gmail.com.
let me know.

2013-08-03

tong chen answers:

<h1>Code Snippets</h1>
<?php
$categories_obj = get_categories(array('orderby' => 'slug')); //get categories
foreach($categories_obj as $cat): //loop ?>
<div class="content-wrap">
<h4 class="entry-title"><?php echo $cat->name;?><span class="headline-all"><a href="<?php echo get_category_link( $cat->term_id ); ?>">View All ยป</a></span></h4>
<?php
$args = array(
'cat'=>$cat->term_id, //Posts for category id
'showposts'=>6 //posts count
);
query_posts($args);
if( have_posts() ) : ?>
<ul>
<?php
//loop
while( have_posts() ) : the_post(); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title();?></a></li>
<?php endwhile; ?>
</ul>
<?php endif;?>
</div>
<?php endforeach; ?>