Home Forums Product Support Novella Character component additional HTML content

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #5380
    Sean
    Participant

    I want to add additional HTML content to the Character component. Specifically a twitter follow me code snippet. Where can I edit the code that builds this component OR edit this on a post by post basis?

    #5399
    Michael Beil
    Keymaster

    Hey Sean,

    We have 4 hooks for all of our components that you could make a Twitter addition to if you follow along with our documentation here: https://aesopstoryengine.com/developers/#scrollNav-4

    Let me know if that helps.

    #5405
    Sean
    Participant

    Michael, thanks for the info. I’ve read the info on hooks and I’m still a bit unclear on proper implementation. Can you provide an example file so that I can get a better idea?

    Thx
    Sean

    #5407
    Michael Beil
    Keymaster

    Hey Sean,

    It could look something like this:

    add_action('aesop_character_before', 'my_whatever');
    function my_whatever(){
      echo 'hi';
    }

    This snippet would place “hi” before every character component.

    Keep me in the loop on how you go about.

    #5410
    Sean
    Participant

    I was able to make a static addition to the character component for each of our posts using the snippet you provided. I need to be able to pull in data specific for each user in the system, I could store their twitter handle in the website field for the user and pull that. How would I pull that field into the action?

    #5415
    Michael Beil
    Keymaster

    You’ll find some use cases for this here: https://codex.wordpress.org/Function_Reference/the_author_meta in combination with this: https://davidwalsh.name/add-profile-fields

    That should get you rolling.

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