I've created a plugin, that registers a custom_post_type. This custom_post_type also has custom_fields. The data I've put in the custom_fields should be showed in the post (in the frotend, for the users). I want my plugin to be completly independent of the template. To do this, I need to access the posts in the plugin itself and put the information from the custom_fields on the bottom of the posts. I dont want to modify any of the "normal" posts, just those of the custom_post_type.
Sadly I have no idea how to do this. I've managed to do that with an if(custom_field != '') but had to access the template do so. But thats not a "clean" and "nice" solution I think.
That's why I have some questions:
- Is it "good" or "allowed" to alter posts within a plugin, without accessing the template?
- If not, how should I alter the posts then?
- If so, can you give me any examples how to so? Maybe a link to a tutorial or just some code snippets?
Thank you very much!