• Hello, I am using your plugin and I want to get the primary category name.

    I am using this code on my website:
    <?php $categories = get_the_category(); if ( ! empty( $categories ) ) { echo esc_html( $categories[0]->name ); } ?>

    Thanks very much !

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to get primary category name’ is closed to new replies.