Orderby no longer working
-
Hi – I’ve been using LCP for years and just noticed that my category listings are no longer sorted alphabetically by category title. I’m not sure when it changed; maybe when I updated to php8?
Wordpress version: 6.0.2
PHP version: 8.0.23
LCP plugin version: 0.87Shortcode with ID removed:
[catlist id=## post_type=page orderby=title order=asc excerpt=no numberposts=-1 template=listcat_template-lessons-main-subject excludeposts=this]Template:
/* This is the string which will gather all the information.*/ $lcp_display_output = ''; // Show category link: $lcp_display_output .= $this->get_category_link('strong'); //Add 'starting' tag. $lcp_display_output .= '<div class="noads">'; /** * 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. * * The 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. */ foreach ($this->catlist->get_categories_posts() as $single): //Create the header for the title: $lcp_display_output .= '<h4 class="topic-page-links">'; //Show the title and link to the post: $lcp_display_output .= $this->get_post_title($single); //Close the header for the title: $lcp_display_output .= '</h4>'; //Set the paragraph style for each post: $lcp_display_output .= ''; //Post Thumbnail $lcp_display_output .= $this->get_thumbnail($single); //Show comments: $lcp_display_output .= $this->get_comments($single); //Show date: $lcp_display_output .= ' ' . $this->get_date($single); //Show author $lcp_display_output .= $this->get_author($single); /** * Post content - Example of how to use tag and class parameters: * This will produce:<p class="lcp_content">The content</p> */ $lcp_display_output .= $this->get_content($single, '', 'lcp_content'); /** * Post content - Example of how to use tag and class parameters: * This will produce:<div class="lcp_excerpt">The content</div> */ $lcp_display_output .= $this->get_excerpt($single, '', 'lcp_excerpt'); //Close li tag $lcp_display_output .= ''; endforeach; $lcp_display_output .= '</div>'; $this->lcp_output = $lcp_display_output;
The page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Orderby no longer working’ is closed to new replies.