• Resolved widrir

    (@widrir)


    I have setting up this:

    [catlist name=peddigrohr-zum-verkauf excerpt=yes thumbnail=yes force_thumbnail=yes posts_morelink=”mehr lesen…”?template=perfectlist]

    Category an excerpt works, the other parameter not.
    Have you any idea what works wrong?
    Best regards Uwe

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor zymeth25

    (@zymeth25)

    Can you share the custom template you are using?

    Thread Starter widrir

    (@widrir)

    Yes, but if I exclude post_morelink and template from settings, it is no thumpnail too:

    <?php
    /*
    Plugin Name: List Category Posts - Template "Sofians Perfect Post List - https://sundari-webdesign.com/wordpress-the-quest-to-my-perfect-list-view-for-posts-events-and-articles"
    Plugin URI: https://picandocodigo.net/programacion/wordpress/list-category-posts-wordpress-plugin-english/
    Description: Template file for List Category Post Plugin for WordPress which is used by plugin by argument template=value.php
    Version: 0.9
    Author: Radek Uldrych & Fernando Briano
    Author URI: https://picandocodigo.net https://radoviny.net
    */
    
    /*
    Copyright 2009 Radek Uldrych (email : [email protected])
    Copyright 2009-2015 Fernando Briano (https://picandocodigo.net)
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or any
    later version.
    
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
    USA
    */
    
    /**
    * The format for templates changed since version 0.17. Since this
    * code is included inside CatListDisplayer, $this refers to the
    * instance of CatListDisplayer that called this file.
    */
    
    /* This is the string which will gather all the information.*/
    $lcp_display_output = '';
    
    //Show category link:
    $lcp_display_output .= $this->get_category_link('strong');
    
    //Show the conditional title:
    $lcp_display_output .= $this->get_conditional_title();
    
    //Add 'starting' tag. Here, I'm using an unordered list (ul) as an example:
    // (Sofian: We work with DIVs so this stays empty)
    $lcp_display_output .= '';
    
    /* Posts Loop
     *
     * The code here will be executed for every post in the category. As
     * you can see, the different options are being called from functions
     * on the $this variable which is a CatListDisplayer.
     *
     * CatListDisplayer has a function for each field we want to show. So
     * you'll see get_excerpt, get_thumbnail, etc.  You can now pass an
     * html tag as a parameter. This tag will sorround the info you want
     * to display. You can also assign a specific CSS class to each field.
    */
    global $post;
    while ( have_posts() ):
      the_post();
    
    //Start a List Item for each post:
    // (Sofian: Here we open the DIV for each post. If the post has a thumbnail, we get it. 
    //  Else we can define a placeholder or leave an empty space next to the indented text.)
      if (has_post_thumbnail($post->ID)):
        $lcp_display_output .= '<div class="postlist withthumb">';
        $lcp_display_output .= '<span class="thumbmagic">';
        $lcp_display_output .= $this->get_thumbnail($post);
        $lcp_display_output .= '</span>';
      else: 
        $lcp_display_output .= '<div class="postlist withthumb">';
        $lcp_display_output .= '<span class="thumbmagic">';
    // (Sofian: Uncomment this line to use a placeholder by changing the path to your placeholder image.
    //  Delete the line or leave it commented to leave an empty space.)    
    // 	$lcp_display_output .= '<img src="https://your-domain.com/wp-content/uploads/default-thumb.jpg" alt="placeholder"></img>';    
        $lcp_display_output .= '</span>';
      endif; 
    
    // (Sofian: Here we open an additional container DIV to wrap our content)     
      $lcp_display_output .= '<div class="lcp-container">';
    
      //Show the title and link to the post:
      $lcp_display_output .= $this->get_post_title($post, 'h3'); 
    
      //Show comments:
      $lcp_display_output .= $this->get_comments($post);  
    
      //Show date:
      $lcp_display_output .= ' ' . $this->get_date($post);  
    
      //Show date modified:
      $lcp_display_output .= ' ' . $this->get_modified_date($post);
    
      //Show author:
      $lcp_display_output .= $this->get_author($post);   
    
      //Custom fields:
      $lcp_display_output .= $this->get_custom_fields($post);
    
      /**
       * Post content
       */
      $lcp_display_output .= $this->get_content($post, 'p', 'lcp_content');
    
      /**
       * Post excerpt
       */
      $lcp_display_output .= $this->get_excerpt($post, 'p', 'lcp_excerpt');
      
      // Get Posts "More" link:
      // (Sofian: We add a class to right-align)
      $lcp_display_output .= '<div class="morelink">' . $this->get_posts_morelink($post) . '</div>';
    
      //Close li tag
      // (Sofian: Closing our div)
      $lcp_display_output .= '</div></div>';
    
    endwhile;
    
    // Close the wrapper I opened at the beginning:
    // (Sofian: We work with DIVs so this stays empty)
    $lcp_display_output .= '';
    
    // If there's a "more link", show it:
    $lcp_display_output .= $this->get_morelink();
    
    // Get category posts count
    $lcp_display_output .= $this->get_category_count();
    
    //Pagination
    $lcp_display_output .= $this->get_pagination();     
    
    $this->lcp_output = $lcp_display_output;
    • This reply was modified 2 years, 9 months ago by widrir.
    Plugin Contributor zymeth25

    (@zymeth25)

    What version of the plug-in are you using? If it’s not the latest one please update.

    Thread Starter widrir

    (@widrir)

    0.86.1

    Thread Starter widrir

    (@widrir)

    Ok, I figuered it out
    [catlist post_type="post,page" name="peddigrohr-anleitungen-bodengestaltung"? excerpt=yes posts_morelink="mehr lesen..." thumbnail=yes force_thumbnail=yes thumbnail_size=thumbnail? template=perfectlist]

    This works

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Dont showa thumpnails’ is closed to new replies.