Display all subcatergory from parent

Question

i have 20 subcategory from a parent category and they are like that
Parent

  • september

  • november

  • .. up to 20
    Here is the code that try it to display but i get only 1 category instead

    <?php
    $categories =  get_categories('child_of=505');
    
    
    foreach ($categories as $category) : ?>
    
     <div class="qitem">
         <a href="<?php get_category_link( $category->term_id ); ?>" title="<?php echo $category->name; ?>">
             <?php echo $category->name; ?>
         </a>
         <h4>
             <span class="caption">
                 <?php echo $category->name; ?>
             </span>
         </h4>
         <p>
             <span class="caption">
                 <?php echo $category->description; ?>
             </span>
         </p>
     </div>
    
0
Digital Point 2 months 2021-10-05T00:41:08-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse