Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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 & Photographer

    Is 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 :)
    Michelle

    #1271008

    Hey 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,
    Rikard

    #1271228

    Thanks – 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

    #1272180

    Hi,

    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

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.