Wrong excerpt showing
-
I am using List catgory posts on this page: http://digitalentrepreneurs.network/ask-me-the-den-members-question-and-answer-board/
I created my own template and it’s working very well and fetching the correct title and thumbnail etc from the posts I want. But in the excerpt, it is showing the excerpt of the same page where the list is included, instead of showing the excerpt of the posts of the chosen category.
My code used to show the list of category posts is this:
[catlist id=2204 template=customtemplate pagination=yes numberposts=4 thumbnail=yes thumbnail_class=cat_list_tn excerpt=yes]My template file has this code:
<?php $lcp_display_output = ''; $lcp_display_output .= '<div>'; foreach ($this->catlist->get_categories_posts() as $single): $lcp_display_output .= '<h6>'.$this->get_post_title($single).'</h6>'; $lcp_display_output .= $this->get_thumbnail($single); $lcp_display_output .= $this->get_excerpt ($single, 'p', 'your p style'); $lcp_display_output .= ''; endforeach; $lcp_display_output .= '</div>'; $lcp_display_output .= $this->get_pagination(); $this->lcp_output = $lcp_display_output; ?>Is there something wrong with my code? I am not a techie so I’m not sure where the mistake is. I had copied this code from another query on the support forum, and it works in all respects except it does not fetch the correct excerpt.
Thanks for your help.
Regards,
Shobha Ponnappa
The topic ‘Wrong excerpt showing’ is closed to new replies.