#Custom Post Type Lister - CPT Lister
This is one amazing, Open Source plugin!
It allows you to list posts from your custom post types.
What is more amazing ?
It is Open Source and yes that means you can contribute to it at every moment you want!
I am the author and my name is Gero Nikolov.
My official website is Blogy, which is social media for Bloggers.
But I am also a WordPress engineer at DevriX.
Check my blog here.
Cheers! :)
#How it works ?
CPT Lister should be called via shortcode [cpt_show]
CPT Lister receives the following arguments :
- type - This is where you say from which CPT you want to get your posts.
- post_status - This is used to tell the plugin for what posts it should look. Here you can use all of the available WordPress options.
- order - This tells the shortcode how to order the results. You can use all of the available WordPress options.
- order_by - This tells the shortcode by what your results should be ordered. You can use all of the available WordPress options.
- posts_per_page - This is used to tell the shortcode how many post should it collect. To get all of the posts that are available in the CPT just set its value to -1
- titles_as_links - This tells the shortcode if the titles of the listed posts should be links that are pointing to the specific page for every unique post. Possible values are 0 & 1. If the value is set to 0 it will print the title without wrapping it in HTML Link tag (), but if the value is set to 1 it will wrap the post title into HTML Link tag and it will point to the specific post page.
- show_post_content - This tells the shortcode if it should show the post content under their titles. Possible values are 0 & 1. If the value is 0 it won't show the post content under its title, but if the value is set to 1 it will list the post content also.
- cptl_title_link_class - This is used to tell the shortcode what class should be added to the Link Wrapper of the post title. By default it is cptl_title_link
- cptl_title_class - This tells the shortcode what class should be added to the Title Wrapper of the post title. By default it is cptl_title
- cptl_content_class - This is used to tell the shortcode what calss should be added to the Content Wrapper of the post content. By default it is cptl_content
- cptl_content_wrapper - This is used to tell the shortcode how wrap the listed results. It can be 'h1', 'h2', 'h3', 'h4', 'h4', 'h6', 'li', 'span', 'div'