No i’m not using block editor and i’m not expert with css or any other language.
In that case, I would highly recommend the using the block editor – it’s designed for users without any coding knowledge.
The example you’ve shown is using the block editor as well without any coding.
can you just give me the code as the above website (which one i mentioned) so it will be easy for me to do so.
We normally cannot provide a full HTML and CSS solution as it’s not a theme-related request and can be achieved easily with the block editor. However, this one is simple enough I can make an exception.
Here is the HTML content:
<div class="affiliate-message"><em>This post may contain affiliate links. Please read our <a href="https://URL here" target="_blank">disclosure</a> for more info.</em></div>
And here is the CSS:
.affiliate-message {
padding: 20px;
background-color: #2222;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Choose the hook generate_after_entry_title
and set the priority to 11
.
The display rules would be Posts > All posts.