[Resolved] Single post author template

Home Forums Support [Resolved] Single post author template

Home Forums Support Single post author template

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2247741
    George

    I want to enter some information on each author’s archive. I know there is the author description but that’s just some unformatted block of text. I would like to be able to use the block editor to have something more substantial. I see that there is no element conditional for a single author. What’s the best way to do it?

    The solution I found was to create as many block elements as authors, assign them in a certain hook and use the generate_element_display filter to conditionally display them to their respective authors. Seems kind of clunky and not user-friendly, though…

    #2247758
    Ying
    Staff
    Customer Support

    Hi George,

    Here’s a video that shows how to achieve this using a block element.
    https://youtu.be/4x6CjGOyagc

    Let me know if this is helpful.

    #2247764
    George

    Hi Ying. I don’t want to create an author box (I am aware of how this is done). I want to create single author pages. The ones that appear when you click on an author’s link. Right now the default functionality is that each author has an archive of posts and I can also inject the description through a hook and a GP dynamic content block. I am after a more elegant way where I would be able to inject block information into each author’s content.

    Another solution I thought of was to redirect each author to a static page but it still feels like a hack. Was wondering if there was something else I could do? More in line with the GP templating system.

    #2247778
    Fernando
    Customer Support

    Hi George,

    Well, you’re correct. You would need to use generate_element_display to achieve as such.

    To clarify, will the structure/layout of the Elements be different for specific authors or just roles? (If it’s just roles, it can be set in the Display Rule location as well.)

    Perhaps we can assist you a bit with your conditional statement if it’s with different authors.

    Kindly let us know.

    #2247781
    George

    It’s for different authors. Each author needs to have a bio and some content. I can handle the author’s conditional, the article is pretty explanatory.

    Thanks, Fernando!

    #2247786
    Fernando
    Customer Support

    You’re welcome George! Feel free to reach out anytime you’ll need assistance with anything else!

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