Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

How to change the link “rel” attribute for posts?

  • #9028
    Avatar photo[anonymous]

    I run my Publii site as a news organization and sometimes have other people guest post for a fee. Is there a way to create an option to change the link “rel” attribute of individual posts to “sponsored” or something else?

    #9031
    Avatar photoBob

    What kind of links are you talking about?

    #9036
    Avatar photo[anonymous]

    Hi Bob, thank you for the quick response.

    I’m talking about the rel attribute for the posts themselves. For example, if I wanted to differentiate a article written by a guest who pays a fee, I would set the maintag as “sponsored” and have the rel attribute be “sponsored,” whereas normal posts would not have any rel attribute. This distinction makes it easier for readers using my RSS to see the sponsored posts, etc.

    But it doesn’t appear that an option for changing the rel attribute exists per post. It would look like the picture I’ve attached, except for the actual posts themselves, not links within the posts.

    #9044
    Avatar photo[anonymous]

    If you go to: https://getpublii.com/docs/the-block-editor.html#inserting-link

    you can read more setting rel=”sponsored” and rel=”ugc” to links in your web pages / posts. Although the page refers to the Block editor, the same options are available for links when using the WYSIWYG editor too.