Simple plugin don’t display content

You need to call your custom file into your main plugin file. Without doing that, your custom file will not get called. Think of your main plugin file as your themes functions.php file and your custom file like a custom file that also holds functions By default, WordPress will only read your functions.php, and not … Read more

Writing editor content to a file

You should hook save_post instead of publish_post. publish_post only runs when a post is initially published and won’t catch subsequent saves. Additionally, the publish_post hook passes parameters to your function and those should be used to retrieve info about the post being published rather get_the_content(), which only works when you’re inside the loop. I think … Read more

Change author permalink to external URL

You can override the author link via the author_link filter: function wpd_author_link( $link, $author_id, $author_nicename ){ return ‘http://my.blog.tld/’; } add_filter( ‘author_link’, ‘wpd_author_link’, 20, 3 ); $author_id and $author_nicename are available to the filter so you can fetch whatever data you need to generate the correct link.