sale-bubble sign-up-large

30% Savings on all Shared Hosting packages and billing cycles
Offer is valid for any shared hosting package & billing cycle including 1, 2 and 3 year accounts. Offer is limited to 1 per customer, is a one-time discount and for new accounts only. To take advantage of the offer use PROMO CODE: SAVE30 when placing your order.

How to Display Only Parent Category in your WordPress Post Loop

Blog - WordPress

When you use the_category() template function in your WordPress theme, it displays both the parent category and any child/subcategories under it. If you are creating a site that uses a lot of child categories to categorize the content, then this can become a problem because the_category code will create a lot of clutter. In this article, we will show you how to display only parent category in your WordPress post loop.

How to Display Only Parent Category in your WordPress Post Loop is a post from: WPBeginner which is not allowed to be copied on other sites.

Related posts:
  1. Display Subcategories on Category Pages in WordPress
  2. How to Exclude Latest Post from the WordPress Post Loop
  3. How to Display Any Number of Posts in a WordPress Loop

(read full article on source site)

busy



Disclosure: Content posted to this site is in no way an endorsement for a product or service and may result in compensation from the vendor. Some content contained in this site is syndicated content.