First item in each category list is not a link

After the last update of the plugin “List Category Posts” the first post item under each category is just text, no link. This request is made at the request of the plugin author as per the help file associated with the plugin as the means to get answers from HIM.

See example here: http://oneangrycitizen.me/categories/

So the category links work but the post links are not working on the first link…

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

The first link was displaying incorrectly because of a bug with a ” sign. On line 60 of ListCatDisplayer.php, there was a wrong “:

$this->lcp_output .= '<' . $tag;
        if (isset($this->params['class'])): $this->lcp_output .= ' class="' . $this->params['class']; endif;
        $this->lcp_output .= '">';

As you can see, I was always adding the ” when closing the tag. So this produced:
First item in each category list is not a link
And if you specified a class and added more parameters, the wrong ” made the whole markup to be wrong.

I’ve fixed it to add the ” only on the class line:

$this->lcp_output .= '<' . $tag;
        if (isset($this->params['class'])): $this->lcp_output .= ' class="' . $this->params['class'] . '"'; endif;
        $this->lcp_output .= '>';

It was fixed in version 0.20.2, now ready for update. Sorry for the inconvenience, and sorry you didn’t get much help in the comments. Usually users tend to be friendlier over here.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x