Get categories and descriptions from custom post type

I figured it out.

I had to create a custom taxonomy and assign it to my custom post type.

Once I did that, I has to attrbute all of the custom posts to the new custom taxonomy (there’s a plugin that I found that does it quickly).

then I just did a foreach loop with get_categoeries.

<?php $args = array('type' => 'rentals', 'taxonomy' => 'rental-categories');
$categories = get_categories($args);

foreach($categories as $category) {
   echo'
   <div class="fg12 rentals">
   <h2> '. $category->name . '</h2>
  <div class="info">
  <p>'. $category->description . '</p>
     <a class="button" href="#">
       Learn More &rarr;
     </a>
    </div>
   </div>';
 }
?>