wp theme development

word press theme Dev basic things

1. get the post categories… //$categories = get_categories(); //all category $categories = get_the_category($post->ID); //post category if($categories !=null){ foreach($categories as $category) { echo ‘<a href=”‘ . get_category_link($category->term_id) . ‘” class=”term-link”>’ . $category->name . ‘</a> ‘; } } 2. get the date …. <?php echo get_the_date(‘j M,Y’); ?> 3.get thumbnail…. <?php echo wp_get_attachment_url(get_post_thumbnail_id());?>  

top