Tagged: custom field, multiple authors
-
AuthorPosts
-
January 7, 2021 at 1:14 pm #1270855
Hi there :)
We are a NPO that publishes reviews and pictures of events (sports, music, cultural events). We are in dear need of a 2nd author-field to link/mention the photographer as well, not just the author. Sometimes two people write on an article so we would like to mention 2 writers.
Is it possible in enfold to make a custom field for “2nd author” or “photographer” that will be displayed in pages?When you open a page it should display something like this (and link to the persons infopage)
17. December 2020 | 1 comment | from Author & Author
17. December 2020 | 1 comment | from Author & PhotographerIs that possible?
And if yes: is it possible to link that page/blog entry to both contributors on their about author-page (resp. enhance the code to list custom-field-entries as well, if they were set in that custom field as 2nd author/photographer)? We would like to give both the credit they deserve for their contribution to an article
Is there maybe a plugin I haven’t found yet for the solution of my problem?
Thanks :)
MichelleJanuary 8, 2021 at 5:05 am #1271008Hey Michelle,
There is nothing like that in the theme by default unfortunately, but you should be able to implement it using a plugin like Advanced Custom Fields, or a similar plugin.
Best regards,
RikardJanuary 9, 2021 at 4:26 pm #1271228Thanks – then I have to find out how to use these advanced custom fields and how they will show in the template. Sounds like I have to add code to the template though
January 13, 2021 at 3:11 pm #1272180Hi,
Thank you for the update.
Would you like to add this in the post page? You may have to modify the includes > loop-index.php file in order to render the custom fields in the post page. But you have to create the custom field first, add a custom value to that field when editing the posts or pages, edit the mentioned template file above, then use the get_field function from the plugin. The following documentation should help.
// https://www.advancedcustomfields.com/resources/code-examples/
// https://www.advancedcustomfields.com/resources/get_field/Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.