Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter alex301188

    (@alex301188)

    Fixed it myself.

    Added this in my template file:
    $lcp_display_output .= '<h4>' . $this->get_cat_name($single) . '</h4>';

    And created a new function in CatListDisplayer.php:

    private function get_cat_name($single){
        $catName = get_cat_name($this->catlist->get_category_id());
        return $catName;
    }

    Hope I can help someone else with it.

    Good, but changes will lost at every upgrade.
    It would be good to add permanently to plugin code…

    Plugin Author Fernando Briano

    (@fernandobt)

    So when you have a list of posts from certain category/ies, you want to display the name of the category next to each post title?

    I guess this would make sense just when using many categories, right?

    Is this something that would be useful as a parameter too?
    E.g.: [catlist id=2,5,92 catname=yes]
    Which would create something like:

    <ul class="lcp_catlist">
      <li>
        <a href="https://localhost/wordpress/?p=217" title="Whatever">Whatever</a> - Category Name
      </li>

    Is this correct? I can add something like this for a future release.

    I think that this feature could help users to customize their lists.

    I vote a big yes for this one, with the option to link to the category. I can’t use the “readmore” links because I’m listing posts from many categories and restricting them to Buddypress groups. It would be great to have the category link within each post meta instead of at the end or beginning of the whole list.

    Plugin Author Fernando Briano

    (@fernandobt)

    I’ll look into this and see if I can release a new version with this functionality soon. Thanks!

    Yay! Thanks!

    I want to use category nice name to style the links … it’s some way to do it with template file or shortcode?
    I asked also this at

    https://www.ads-software.com/support/topic/category-as-class?replies=1#post-5226699

    Thanks in advance!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Display category name’ is closed to new replies.