Unable to get posts with category on my page

add in standard WordPress post specific template tags here eg. the_title(), the_permalink, the_content, the_excerpt etc. endforeach; Like that comments says, call the function you need to display the title. The category argument appears to represent the category ID, not the slug. Try using category_name instead. [php] $myposts = new WP_Query(‘posts_per_page=5&category_name=basics’); while($myposts->have_posts()): $myposts->the_post(); // your output … Read more

The loop: more posts than I want to fit on one page

You’re looking for one of two things: either paginate_links(), or the combination of next_posts_link() and previous_posts_link(). Both of these functions allow for “pagination”, or the ability to place links to more content than you’re displaying in a screenful. Google does this on the bottom of most pages, for example. Of the two methods I mentioned … Read more

retrieve post slug by post_tags taxonomy

i am not sure but try this: query_posts(‘category_name=”. $category[0]->cat_name); if (have_posts()) : while (have_posts()) : the_post(); $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { $all_tags_arr[] = array($tag->name,wp_basename(get_permalink())); } } endwhile; endif; foreach ($all_tags_arr as $cat_by_tag) { $output_promotion .= “<li><a href=”‘ . get_bloginfo(‘url’). “https://wordpress.stackexchange.com/” . $cat_by_tag[1] . “https://wordpress.stackexchange.com/”>’. $cat_by_tag[0] .'</a></li>’; } print_r($output_promotion);

Most visited posts

Not sure about weekly but you can use http://wordpress.org/extend/plugins/wp-postviews/ to count the views on each post and then use a custom query to order the views by the post meta key ‘views’.