You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using any content in the post list (like author, excerpt etc.), the resulting HTML does not contain leading space to separate the content from date.
I think, the bug is in the content_getter() function in lcp-catlist.php file. It does not add an extra space in front of the content received. For case of author, tho line: $info = $this->catlist->get_author_to_show($post);
should be replaced with: $info = ' ' . $this->catlist->get_author_to_show($post);
to add the extra space.
I have learned this approach from another function get_modified_date(), which adds the space as following: $info = " " . $this->catlist->get_modified_date_to_show($single);
Expected behaviour
Short code
[catlist name=news date_modified=yes excerpt=yes]
should produce (an example contents): My latest post 8.11.2017 This news is about ...
The point is in the space between the content parts, date and excerpt.
Actual behaviour
But the resulting HTML does not generate space between date and excerpt: My latest post 8.11.2017This news is about ...
Shortcode used and steps to reproduce the behaviour
[catlist name=news date_modified=yes excerpt=yes]
WP version, LCP plugin version (versions of other software if relevant, e.g. PHP)
The code you are referring to is going to be majorly refactored in #288.
The problem here is that I'm not so sure we should add this space because it's not useful in every case. For example if someone uses [catlist date_modified=yes date_modified_tag=div] the leading space is unnecessary.
But I agree that when using just [catlist date_modified=yes excerpt=yes] the default output is not the best.
Proposed solution: add a leading space only if _tag customization parameter is not used. What do you think @picandocodigo?
@milanbx A quick solution to use right now is to use [catlist date_modified=yes date_modified_class=lcp_date_modified excerpt=yes] and add the following CSS to your site:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
When using any content in the post list (like author, excerpt etc.), the resulting HTML does not contain leading space to separate the content from date.
I think, the bug is in the
content_getter()
function inlcp-catlist.php
file. It does not add an extra space in front of the content received. For case of author, tho line:$info = $this->catlist->get_author_to_show($post);
should be replaced with:
$info = ' ' . $this->catlist->get_author_to_show($post);
to add the extra space.
I have learned this approach from another function
get_modified_date()
, which adds the space as following:$info = " " . $this->catlist->get_modified_date_to_show($single);
Expected behaviour
Short code
[catlist name=news date_modified=yes excerpt=yes]
should produce (an example contents):
My latest post 8.11.2017 This news is about ...
The point is in the space between the content parts, date and excerpt.
Actual behaviour
But the resulting HTML does not generate space between date and excerpt:
My latest post 8.11.2017This news is about ...
Shortcode used and steps to reproduce the behaviour
[catlist name=news date_modified=yes excerpt=yes]
WP version, LCP plugin version (versions of other software if relevant, e.g. PHP)
WP version: 4.9.8
LCP version: 0.79
source code module:
lcp-catlist.php
addressed function:
content_getter()
Hope I'm right.
Milan
The text was updated successfully, but these errors were encountered: