Viewing 2 replies - 1 through 2 (of 2 total)
  • When you are adding category from backend you can choose parent option to add subcategory so if you create category braekfast it will list the braekfast subcategory and after clicking on them you will get the list of all the posts related to breakfast which you have added in the breakfast/subcategory from the backend dashboard

    Thread Starter fareed_khan

    (@fareed_khan)

    This file is running dining.php and

    this is my code…..

    <div class=”row”>
    <h3 class=”col-lg-12 text-center margins-top-bot”>
    Select a Category</h3>
    <?php $dining = new WP_Query(array(
    ‘post_type’ => ‘dining’,
    ‘order’ =>’ASC’
    ));?>

    <?php while($dining->have_posts()) : $dining->the_post(); ?>
    <div class=”col-lg-2 col-sm-4 ful-size-pic”>
    “>
    <?php the_post_thumbnail();?>
    <p><?php the_title();?></p>

    </div><!– col-lg-2-end –>
    <?php endwhile;?>
    </div><!– Row-End –>

    I have made one category but still it is not showing….

    kindly advise whether a seperate code will be required for it in single-dining.php

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to create different types of categories in a post page’ is closed to new replies.