I’m trying to set my blog up where every time a post is made (or updated, but only on the most recent post), it automatically saves the post title and url to a text file on the server. This is so that I can display a “latest on the blog” widget on other non-blog parts of my site. Does anyone know which file handles the operations I’m talking about, or other ways to accomplish this?
Thanks in advance!
As Sabeen said, it’s much better to perform this logic as a plugin rather than modifying the core files. That’s what the plugin API is there for.
You’ll probably want to use the
pre_post_updateaction for your plugin; as such.http://codex.wordpress.org/Plugin_API
http://codex.wordpress.org/Function_Reference