Quick tip: set post connector using PHP code

I actually wrote about this back in April, but it’s such a nice feature that it’s worth mentioning again (also: I had forgot about this myself!):

You can use PHP to set the Post Connector for a post. This has some nice benefits:

  • Post Connectors can be set automatically (no user has to select something is a dropdown)
  • Post Connectors can be set based on Post ID, Tags, Categories, what ever you want or need
  • If you set the Post Connector using code you can then hide the post connector dropdown completely from the edit post screen = much cleaner and more easy to use interface

Some code examples to get you started:

One thought on “Quick tip: set post connector using PHP code

  1. Serban

    Hi Pär,

    Thanks for the great plugin!

    I’ve got two questions on this. First, should the code above be used in functions.php? And second, does this work for pages too, or only for posts?

Leave a Reply