Skip to content
Klemens Starybrat edited this page Apr 25, 2021 · 5 revisions

Templates for List Category Posts are searched for in your WordPress theme's folder. You should create a folder named list-category-posts under wp-content/themes/your-theme-folder. Template files are .php files.

You can use the included template as an example to start. It's in the plugin's template folder under the name default.php. Be warned, however, that this is the default template the plugin uses to create output so if you change it, you will change the plugin's default behavior. When you update the plugin this file will be overwritten so it's best not to edit it but copy it over to another file to create your custom template.

To use a custom template, use this code:
[catlist id=1 template=templatename]
If the template file were templatename.php.

You can have as many different templates as you want, and use them in different pages and posts. The template code is pretty well documented, so if you're a bit familiar with HTML and PHP, you'll have no problems creating your own template.

Please also make sure you are familiar with how tags and classes assignment works in templates.

Examples

Clone this wiki locally