How do I get the code below to display just the current post that corresponds to the current URL and not all the post from the same category? Barakadam, It works but it brings all the posts in the category instead of the one that was clicked on.
<?php
$category = end(get_the_category());
$current_name = $category->cat_name;
?>
<?php
// assign the variable as current category
$category_name = $current_name;
// concatenate the query
$args = 'category_name=' . $current_name;
// run the query
query_posts( $args );
if ( have_posts() ) : while ( have_posts() ) : the_post() ;
// do something here
the_title();
the_content( __('Read the rest of this page »', 'template'));
endwhile; endif;
wp_reset_postdata();
?>