picandocodigo / List-Category-Posts

WordPress plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode.
http://wordpress.org/extend/plugins/list-category-posts/
GNU General Public License v2.0
241 stars 112 forks source link

catlist shortcodes are not interpreted if used in widget #472

Closed funkrusher closed 2 years ago

funkrusher commented 2 years ago

The "catlist" does not seem to work anymore as "Individual HTML" in a widget-area. It seems it is not interpreted anymore but just rendered as is.

See the widget-code that worked in a previous version: image

the wiki of list-category-posts writes that this feature should be supported:

Since WordPress 4.9, you can use shortcode in text widgets. So you can just add a text widget in Appearence > Widgets and write the List Category Posts shortcode.

Expected behavior

The "catlist" should render in an "Individual HTML" widget

Actual behavior

The "catlist" tag is just output as-is to the screen and is not interpreted beforehand.

See:

image

Shortcode used and steps to reproduce the behavior

WP version, LCP plugin version (versions of other software if relevant, e.g. PHP)

WordPress 5.8.1 ListCategoryPosts Version 0.85.1 Classic Widgets 0.2

klemens-st commented 2 years ago

The wiki page about the widget has not been updated recently to reflect the changes in current WordPress versions, but nonetheless it specifically mentions a text widget, what you tried was a Custom HTML widget which does not support shortcodes.

The text widget was replaced by the "Paragraph" widget which supports shortcodes and there is also a new dedicated "Shortcode" widget. Either will work with List Category posts.

I will update the wiki page with this information.