I am trying to create a secondary 'author' field on posts on Bristol Live Magazine: hidden link
The reason we are doing this is because we want to be able to select a photographer for live reviews, and have the photographer's name and a link to their profile display on the post.
Once the field is created I will be able to add it to the post templates myself, but I'm unsure how to create the field.
What I want is for it to operate in the same way as the 'author' field, so it shows a dropdown list of site users which the editor can select from.
I'm not too sure how well the instructions below will work with our Toolset plugins and retrieving the author information but you can have a look and let me know if it helps.
Thanks for this. I had found that article before posting here. It just links to a couple of plugins which unfortunately don't provide what I'm after here.
What I'm looking to do is to create a separate, secondary author field which can be used when creating a post, so I can differentiate between Author Field 1 and Author Field 2 on the front-end of the site.
I guess what I'm asking is whether it's possible to create a drop-down post field with Types and then auto-populate it from the site users?
Is it that you want to manually assign the secondary author by selecting them from a list ? If so then this list will need to be manually populated with the list of the users.
Some custom code will need to be used in order to dynamically generate the list.
Yes, that's exactly what I want to be able to do - I want to be able to select a secondary author for the post from the list of users on the site; exactly as you would with the primary author field.
Are you able to point me towards any documentation on how to dynamically generate the list?
Unfortunately we don't have any documentation on this as its not possible to auto populate without custom code.
However you can try using the code below and customizing it to get the users.
To Get this to work you will need to replace the Text “Team Leader” with the name of the select field you wish to populate. Everything else is a Basic wordpress Query