Support » Plugin: List category posts » NAME CATEGORY PER LINE

  • Hi i need create one list news equal this image example, but into the plugin not is possible create the column LISTED CATEGORIES.

    esmeraldino.com/arquivos/news.jpg

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • I need is just THAT: https://wordpress.org/support/topic/post-specific-category-links/

    Please, help me for my question!
    Thanks

    Hi, @grsgrk

    Is possible you help me for resolve this?? I need the same problem! How you resolved?
    Thanks

    • This reply was modified 3 years, 5 months ago by somarcio.

    Hey somarcio, if you read my last post here: https://wordpress.org/support/topic/post-specific-category-links/, you’ll see that I never got this plugin to work as I needed. Instead I had to use the default WP list and modify it.

    I don’t remember all the details since it was almost 3 years ago but hopefully that gives you another idea. I guess the author didn’t have a chance to add this function or doesn’t find it adds value.

    Good luck!

    Hi @grsgrk,

    I resolved my problem replace code into the include/lcp-catlist.php:
    I replace this code:

    // Loop on several categories:
    foreach($ids as $lcp_id){
    $cat_link = get_category_link($lcp_id);
    $cat_title = get_cat_name($lcp_id);

    // Use the category title or ‘catlink_string’ set by user:
    if ($this->utils->lcp_not_empty(‘catlink_string’)){
    $cat_string = $this->params[‘catlink_string’];
    } else {
    $cat_string = $cat_title;
    }

    global $post;

    // Do we want the link or just the title?
    if ($this->params[‘catlink’] == ‘yes’){
    $cat_string = $post->ID.’‘ .
    $cat_string .
    $this->get_category_count() . ‘
    ‘;
    }
    array_push($link, $cat_string);
    }

    For my code:
    global $post;
    $cats = get_the_category($post->ID);

    if($this->params[‘catname’] == ‘yes’){
    foreach ($cats as $cat) {
    $link_cat = get_category_link($cat->term_id);

    if($this->params[‘catlink’] == ‘yes’){
    $cat_string = ““.$cat->name.”“;
    }else{
    $cat_string = $cat->name;
    }
    array_push($link, $cat_string);
    }
    }

    Thanks

    • This reply was modified 3 years, 5 months ago by Matthew.
    • This reply was modified 3 years, 5 months ago by Matthew.
    • This reply was modified 3 years, 5 months ago by Matthew.
    • This reply was modified 3 years, 5 months ago by Matthew.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘NAME CATEGORY PER LINE’ is closed to new replies.