I’m using a wordpress backend on my site and displaying the articles via my own way on the front end. I can’t seem to find the file that parses the output of posts. I’m trying to get to the code that process a post so that I can copy it for my site and make some minor changes to how it’s displayed on my site.
Any ideas on where this file is? I’ve been through about 15 files searching but it’s growing tiresome.
Your question is unclear. The function which processes the caption shortcode is
img_caption_shortcodeand is inwp-includes/media.php. If you want to change the output of this you can create a filter function for theimg_caption_shortcodehook (the comments for that function detail the required parameters).If you need all the code that processes post content before output, this is more difficult due to the WordPress plugin API and it’s system of filter and action functions. The filter hook you need to look for is
the_content, by default (in WordPress 2.9) this passes post content through the following filter functions: