Skip to main content

how How to show perticular categoruparticular category all post in custom single file

letLet me tell details about what iI am trying to do,

iI have one category call Members this category show in custom category file. and in category page show featured images with <?php the_permalink(); ?> so when iI click thumbnail image it go to single.php file this is wordpressWordPress system for this Members category post iI have one custom template also. which define in single.php bellow is code

    <?php
get_header(); ?>
<div class="contentarea cf">
  <?php while ( have_posts() ) : the_post(); ?>
  <h3>
    <?php the_title(); ?>
  </h3>
  <?php
    if ( in_category( 'members' ) ) {
         get_template_part( 'content', 'members' );
    } 
     
    else {
        get_template_part( 'content', 'common' );
    }
 ?>
  <?php endwhile;  ?>
</div>
<?php get_footer(); ?>

so when Members post open its go to content-members.php file and show post. but now iI want in this page will show all Members post not only one post. iI can't figure out yet how to do that.

how to show perticular categoru all post in custom single file

let me tell details what i am trying to do,

i have one category call Members this category show in custom category file. and in category page show featured images with <?php the_permalink(); ?> so when i click thumbnail image it go to single.php file this is wordpress system for this Members category post i have one custom template also. which define in single.php bellow is code

    <?php
get_header(); ?>
<div class="contentarea cf">
  <?php while ( have_posts() ) : the_post(); ?>
  <h3>
    <?php the_title(); ?>
  </h3>
  <?php
    if ( in_category( 'members' ) ) {
         get_template_part( 'content', 'members' );
    } 
     
    else {
        get_template_part( 'content', 'common' );
    }
 ?>
  <?php endwhile;  ?>
</div>
<?php get_footer(); ?>

so when Members post open its go to content-members.php file and show post. but now i want in this page will show all Members post not only one post. i can't figure out yet how to do that.

How to show particular category all post in custom single file

Let me tell details about what I am trying to do,

I have one category call Members this category show in custom category file. and in category page show featured images with <?php the_permalink(); ?> so when I click thumbnail image it go to single.php file this is WordPress system for this Members category post I have one custom template also. which define in single.php bellow is code

<?php
get_header(); ?>
<div class="contentarea cf">
  <?php while ( have_posts() ) : the_post(); ?>
  <h3>
    <?php the_title(); ?>
  </h3>
  <?php
    if ( in_category( 'members' ) ) {
         get_template_part( 'content', 'members' );
    } 
     
    else {
        get_template_part( 'content', 'common' );
    }
 ?>
  <?php endwhile;  ?>
</div>
<?php get_footer(); ?>

so when Members post open its go to content-members.php file and show post. but now I want in this page will show all Members post not only one post. I can't figure out yet how to do that.

Source Link
pagol
  • 203
  • 2
  • 4
  • 18

how to show perticular categoru all post in custom single file

let me tell details what i am trying to do,

i have one category call Members this category show in custom category file. and in category page show featured images with <?php the_permalink(); ?> so when i click thumbnail image it go to single.php file this is wordpress system for this Members category post i have one custom template also. which define in single.php bellow is code

    <?php
get_header(); ?>
<div class="contentarea cf">
  <?php while ( have_posts() ) : the_post(); ?>
  <h3>
    <?php the_title(); ?>
  </h3>
  <?php
    if ( in_category( 'members' ) ) {
         get_template_part( 'content', 'members' );
    } 
     
    else {
        get_template_part( 'content', 'common' );
    }
 ?>
  <?php endwhile;  ?>
</div>
<?php get_footer(); ?>

so when Members post open its go to content-members.php file and show post. but now i want in this page will show all Members post not only one post. i can't figure out yet how to do that.