Plugin Author
Ajay
(@ajay)
You can use the API functions for this. See this example – https://gist.github.com/ajaydsouza/968b24a052e858bf8926
OK, I see.
A little help here., please :
When I use the shortcode (e.g. [crp limit=”3″ heading=”1″ cache=”1″] ) which php file I need to override and where to put my file in order to perform custom output ?
Thanks
Never mind, I used your crp_custom_template filter to override the default template.
Nice functionality. Thanks!
Plugin Author
Ajay
(@ajay)
Glad to know that worked – do you mind sharing that code in case other users find it helpful? I’m yet to see examples around that being used publicly!
Sure.
I just overrode the standard template of the plugin by adding a filter to the crp_custom_template in my theme’s child functions.php like this :
add_filter('crp_custom_template', 'diane_crp_template', 10, 3);
Then also in my functions.php I copied the contents of the functions get_crp() (I renamed it diane_crp_template()) and crp_list_link() of the file main-query.php and customised them as necessary.
I also created my own CSS.
I wanted to create related posts for recipes posts.
The results : Link-1 and Link-2
-
This reply was modified 7 years, 10 months ago by
gtaranti.
Plugin Author
Ajay
(@ajay)
Thanks – definitely helpful!