How to display all posts in a category at the end of a single post?

The "work" page for my portfolio is simply all the posts in the "work" category. They are displayed as a thumbnail grid. Here.

<?php get_header(); ?>  <div class="grid work thumb-wrap clearfix"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post();?>                               <a class="thumb" href="<?php the_permalink(); ?>">             <img src="http://www.nathanspence.com/wp-content/uploads/<?php echo get_post_meta($  post->ID, 'thumb', true); ?>"/>             <div class="post-excerpt">                 <h2><?php echo get_the_title($  ID); ?></h2>                 <div class="sub-title"><?php echo get_post_meta($  post->ID, 'project-name', true); ?></div>             </div>               </a>                               <?php endwhile; ?>         <?php endif; ?>  </div><!--end of "thumb-wrap"-->  <div class="push"></div>      </div><!--end of "page-wrap"-->   <?php get_footer(); ?> 

I want to duplicate this at the end of each single post. Here.

<?php get_header(); ?>  <div class="page-content">  <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>   <article class="work post-content ready-to-column clearfix">                      <header class="post-header column-left">         <h1><?php echo get_the_title($  ID); ?></h1>         <h2><?php echo get_post_meta($  post->ID, 'project-name', true); ?></h2>         <div class="project-info"><?php echo get_post_meta($  post->ID, 'project-info', true); ?></div>                        </header>          <div class="column-right">     <?php the_content(); ?>                                   </div><!---end of "right-column flex-column"--->               </article>      <?php endwhile; else: ?>     <p>Sorry, this post does not exist</p> <?php endif; ?>          <div class="grid work thumb-wrap clearfix"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post();?>                               <a class="thumb" href="<?php the_permalink(); ?>">             <img src="http://www.nathanspence.com/wp-content/uploads/<?php echo get_post_meta($  post->ID, 'thumb', true); ?>"/>             <div class="post-excerpt">                 <h2><?php echo get_the_title($  ID); ?></h2>                 <div class="sub-title"><?php echo get_post_meta($  post->ID, 'project-name', true); ?></div>             </div>               </a>                               <?php endwhile; ?>         <?php endif; ?>  </div><!--end of "thumb-wrap"-->  <div class="push"></div>      </div><!--end of "page-wrap"-->   <?php get_footer(); ?>  

As you can see, simply pasting it in just shows the current posts thumbnail. Any idea how I can do this?

Submit new posts to current category

i’m trying to Submit new posts to current category. For example on a wordpress site i select the category "Cars" and i see all the posts that belong to category "Cars" as archive page. In this time the current category is "Cars". If i use a form plugin to insert at front end the title and the body of a new post, is it possible to assign the current category on the new post?

thanks for the support.

Get Posts by Category, Tag , and CPT Taxonomy

How to print only those posts which have Category, Tag, CPT Taxonomy.

I have tried out with this code but nothing prints. To print posts I used SS [commonposts category="2" tag="3" taxonomy="company" tax_term="4" posts_per_page="5"]

function common_cats($  att){     $  args = array(     'post_type'=> 'post',     'category'    => ['category'],     'tag'    => ['tag'],     'taxonomy'    => ['taxonomy'],     'tax_term'    => ['tax_term'],     'posts_per_page' => ['posts_per_page']      );                 $  the_query = new WP_Query( $  args );    if($  the_query->have_posts() ) :      while ( $  the_query->have_posts() ) :       $  the_query->the_post();        $  output .= "<a href=".get_permalink().">.the_title().</a>";   endwhile;      wp_reset_postdata();  else:  endif; } add_shortcode('commonposts', 'common_cats'); 

Appreciate everybody’s effort.

Not able to open category post

my website home page working perfectly fine all links are clickable and opening, but when I open any menu or category page I’m not able to click and open the post. However, If I right-click and open the post in a new tab or window, it is opening perfectly fine. If I open customize preview mode then also all links are working fine. Does anyone know what is the issue here and how can I fix it?

The page I need help with: https://cominggames.com/category/best-and-worst/

How to get sale product first on category listing page woocommerce?

I want to sort product on category listing page. Want to display sale product first and remaning product after sale product. I have used woocommerce_get_catalog_ordering_args hook for sorting but not working.

My code looks like this

function catalog_ordering_args( $  args ) {     if( !is_product_category() ){         return $  args;     }      $  args['orderby'] = 'meta_value_num';     $  args['order'] = 'ASC';     $  args['meta_key'] = '_sale_price';      return $  args; } add_filter( 'woocommerce_get_catalog_ordering_args', 'catalog_ordering_args', 20, 1 ); 

It should also work for variation products