Show category name as page title without link (name only) in Single Post

/ Published in: CSS
Save to your folder(s)

Copy this code and paste it in your HTML
  1. <h2><?php
  2. foreach((get_the_category()) as $category) {
  3. echo $category->cat_name . ' ';
  4. }
  5. ?></h2>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.