This plugin will help developer to show/render posts/custom posts(CPT) very easily.
This plugin register a shortcode, which developer can use to render any kind of posts in your custom html formate where all you can you all your PHP function/condition available.
This Plugin also have a function to load your post’s by Ajax, Shortcode will automatically generate a Load More Button if posts available.
This plugin also support with Gutenberg.
How to use
Shortcode : [render-posts]
Available Arguments :
1. *type = “You Post type ”
1. number = “Posts Per Page” — if not specify it will inherit from wordpress global posts_per_page option serttings.
1. title = “Section title”
1. detail = “Section Detail”
1. noloadmore = “true” — Set it if you dont want to show loadmore button
eg. [render-posts type=”post”]
How to add Custom Post template.
To make a custom post template you have to crate a php function with a specific name.
And Your function have to RETURN(NOT echo) the whole markup as a string. This function will have one argument post id.
Function Name: postType_template($post_id) ,
eg: post_template($post_id) , event_template($post_id), member_template($post_id) for post, event and member Post Type.
For Example function:
Please Visit: Github-Gist
Your defined template function will receive a single post id as its first argument. You can use this id to manipulate/make the posts markup for post/cpt template.
After create the function, you have to Attached/link your created function to function.php or via other plugin so that your created function can be accessible by WordPress.
Note : You have to return the markup, you cant echo the markup from the function. It can cause error.
Upload the plugin folder to the
/wp-content/plugins directory, or install the plugin through the WordPress plugins screen directly.
Activate the plugin through the ‘Plugins’ screen in WordPress.
This plugin do not have any settings page, so after install you just have to active the plugin, thats it.
Then you can use [render-post] shortcode to render/show your posts.
Is this plugin have any settings page
No, This plugin currently do not have any settings page. you just have to active the plugin to use.
Can i Render/Show Custom Post type by this plugin short code
Yes, You can, you have to provide type argument with your post type. eg [render-posts type=”custom-post-type-name”]
How to render/show posts with my custom markup
To show post with you markup you have to define a function, which name will be a specific formate. eg. event_template(), member_template() etc. When you post type is event, member. Please see the Technical Documentation for more info.