Support » Plugin: List category posts » Show category name beside the date

  • Resolved ludwig33

    (@ludwig33)


    Hi,

    I found two threads for this topic and both are closed without comment. So it is not possible to show the category name beside each post in a list which shows all categories of the archive.

    Best regards
    Ludwig

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter ludwig33

    (@ludwig33)

    Actual I use the shortcode:
    [catlist date=yes dateformat="j.m.Y" numberposts=24 pagination=yes]

    Plugin Contributor zymeth25

    (@zymeth25)

    No, currently this is not possible. It hasn’t been implemented yet mostly because of implementation difficulties: what about posts with many categories, which category should we display then?

    Thread Starter ludwig33

    (@ludwig33)

    Thank you for the quick response. I think all assigned categories should be displayed, separated through a choosable character like comma or slash or …

    Thread Starter ludwig33

    (@ludwig33)

    Found a quick hack for me to include in my template:

    // get category from post
    $arr_categories = get_the_category( get_the_ID() );
    $anz_categories = count( $arr_categories );
    if ( $anz_categories ) {
      // at the moment only the first category was used
      $cat_name = $arr_categories[0]->name;
      $cat_slug = $arr_categories[0]->slug;
    }
    Plugin Contributor zymeth25

    (@zymeth25)

    Yes, you can achieve basically anything in a custom template

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show category name beside the date’ is closed to new replies.