[Resolved] FontAwesome icon for "posted on" entry meta

Home Forums Support [Resolved] FontAwesome icon for "posted on" entry meta

Home Forums Support FontAwesome icon for "posted on" entry meta

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #243534
    Luca

    Hi,

    What would be the best way to add a fontawesome icon to the posted on meta WITHOUT using the :before pseudo-element in CSS but rather adding the actual <i> code? The key reason for doing that vs. CSS would be to be able to define that as aria-hidden.

    Thanks,
    Luca

    #243631
    Tom
    Lead Developer
    Lead Developer

    Hi Luca,

    You would have to overwrite the generate_entry_meta() function by copying the entire function into your child theme/custom plugin: https://github.com/tomusborne/GeneratePress/blob/1.3.40/inc/template-tags.php#L217-L251

    Let me know if you need more info ๐Ÿ™‚

    #244252
    Luca

    Ok thanks.

    However, for the future would you give some thought to consider inserting the FA icons (see also the tags and categories icons in blog posts) using the <i> tags rather than the :before pseudoclass as using the <i> tag with ARIA syntax improves accessibility and is the suggested way by their own guidelines: http://fontawesome.io/accessibility/

    Just saying….

    Cheers,
    Luca

    #244280
    Tom
    Lead Developer
    Lead Developer

    I’ll definitely look into it – thank you! ๐Ÿ™‚

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