zymeth25
Forum Replies Created
-
Forum: Plugins
In reply to: [List category posts] Set three class at “get_category_link” of templateYou cannot do it like this, the arguments you pass (tag and class) are used to wrap the category link, not to alter it.
There is a workaround you can try though:
$lcp_display_output .= '<span class="entry-meta_items entry-meta_items_term">'; $catlink = $this->get_category_link(); $lcp_display_output .= substr_replace($catlink, ' class="btn btn-xs btn-primary"', 2, 0); $lcp_display_output .= '</span></div>';
Forum: Plugins
In reply to: [List category posts] Not all pages under a category are showingGlad it worked! Please mark this as resolved ??
Forum: Plugins
In reply to: [List category posts] Not all pages under a category are showingRead the documentation first! The asnwer is right there:
numberposts – Number of posts to return. Set to 0 to use the max number of posts per page. Set to -1 to remove the limit. Ex: [catlist name=mycategory numberposts=10] You can set the default number of posts globally on the options page on your Dashboard in Settings / List Category Posts.
Forum: Plugins
In reply to: [List category posts] customfield_name as a customfield_classHi @sokoln
Yes, you can do this with custom templates. It’s not possible to do this just with the shortcode. You will need something like
[catlist template=mytemplate]
and then in the template file you can put your customfields wherever you want.I think that when we are in a month archive page or on a blog page or any other page that doesn’t explicitly have a category,
[catlist categorypage=yes]
should just display list of latest posts. That is the most logical solution to me.- This reply was modified 7 years, 2 months ago by zymeth25.
So as far as your first link is concerned, my bugfix version of the plugin I shared in the other thread already fixes it. I hope we’ll be able to include the fix in the next release.
Yes, the second case you shared is special because blog main page or a website’s homepage doesn’t have a ‘current’ category so weird behavior is to be expected ?? And what you see would happen even if you used just two widgets with same configuration (e.g. shortcode or regular widget). What happens under the hood is that the plugin tries to determine the category of the main WP query, there is none so it looks for the category in the global
$post
variable. At this point the$post
variable points to the last post of the main Loop, of course, so the first widget loads the ‘Uncategorised’ category. But the way the plugin works, it resets the main query after every execution. So when the second widget is evaluated, the global$post
variable points to the first post of the main Loop which you can see at the top of the site, and its category is ‘Category 1’.So even though I don’t think detecting the current category should be used on home page, it might be a good idea to at least make the widgets display same results in future releases.
- This reply was modified 7 years, 2 months ago by zymeth25.
What version of the plugin are you using on this test site? Any files changed?
The problem is the widget uses one method to determine which posts to show and another to determine the catlink/catname in the widget title field. That’s what you can see in the first link you have shared.
I’ll run more tests and get back to you soon.
Forum: Plugins
In reply to: [List category posts] catlink on title field of widget does not workOk, thanks, I was able to replicate your issue.
I have already written a fix for this and will send it to Fernando, but would be nice if you could test it and confirm everything is working as it should on your side. You can find my updated version of the plugin here
This only fixes it in the shortcode. The widget is unaffected.
Just tested your solution @infinityx78 and it seems to work both in the shortcode and the widget. Are you seeing different results?
Well spotted, thanks for reporting this!
Forum: Plugins
In reply to: [List category posts] catlink on title field of widget does not workYes, I put
catlink
in the title field of the widget and it worked. Are there any more details to it? Does the issue occur on every page or only some pages?Forum: Plugins
In reply to: [List category posts] catlink on title field of widget does not workThat’s strange, I cannot seem to be able to replicate this issue. It works fine when I test it.
Forum: Plugins
In reply to: [List category posts] feature request: catname_tag, catname_classI am guessing it’s because conditional_title_tag defaults to h3, while catlink_tag doesn’t default to anything?
Yes,
conditional_title_tag
defaults toh3
butcatlink_tag
defaults tostrong
.And yes, what you observed is a bug that makes
catlink_class
work only if you specifycatlink_tag
, otherwise you just get the defaultstrong
. This is already a known bug and should be fixed in future releases.Forum: Plugins
In reply to: [List category posts] feature request: catname_tag, catname_classHi @infinityx78
The documentation says
catname – Show the title of the category (or categories), works exactly as catlink, but it doesn’t add a link to the category.
I know this is not obvious, but it really works exactly as catlink, to the extent that you can use
catlink_tag
andcatlink_class
together withcatname=yes
and it will work exactly the way you want ?? CheersForum: Plugins
In reply to: [List category posts] List Category Post showing codes from other pluginsHi @jimmyvh
This is because the plugin doesn’t support shortcode evaluation in excerpts. It is not possible to display the result of the NextGen shortcode within the list generated by this plugin.