Add an affiliate disclosure under the title of a post without it showing up in the meta description?

Joined
Apr 30, 2020
Messages
57
Likes
65
Points
0
How do you add an affiliate disclosure under the title of the article without it becoming a part of the meta description of your articles? Some of the plugins that insert the disclosure in this manner cannot prevent this from happening.
 

Ryuzaki

お前はもう死んでいる
Staff member
BuSo Pro
Digital Strategist
Joined
Sep 3, 2014
Messages
4,421
Likes
8,514
Points
8
How do you add an affiliate disclosure under the title of the article without it becoming a part of the meta description of your articles? Some of the plugins that insert the disclosure in this manner cannot prevent this from happening.

If text is on the page, it's going to get indexed. There's no way to tell Google to ignore a certain part of the page or not for indexation. And now, these days, even inserting it client-side with Javascript will be rendered and counted. The only way I can think of at the moment, pre-coffee, is to add it with an image, which is goofy.

I think the best move is to add your disclosure and then specifically set a meta description that doesn't include those lines, and then hope Google isn't so dumb as to use a boilerplate message in the meta description in the live SERPs.
 
Joined
Oct 5, 2020
Messages
1
Likes
2
Points
0
I had my disclosure show up in the search results although I had given my posts a separate meta description. After I wrapped my disclosure in a <span data-nosnippet> Google changed the meta descriptions back...
 

bernard

BuSo Pro
Joined
Dec 31, 2016
Messages
1,122
Likes
856
Points
3
Does it actually need to be right under the title though? It could also be in the sidebar.
 
Joined
Oct 14, 2014
Messages
83
Likes
62
Points
0
You could add it with CSS's "content" property.

I do that with those "the article continues under the ad" snippets in the body.

I suppose Google CAN "read" what you put in there, like they can run and execute js, but to my knowledge they don't index it as text on page. At least it doesn't show up if you search for it in quotes for the page.

Here's how you do it if you don't know https://css-tricks.com/css-content/

Style it like you want.
 
Joined
Apr 12, 2019
Messages
181
Likes
318
Points
1
You just have to put the disclosure prominently. What constitutes as prominent is up to you. If you're having problems with it being under the title, move it elsewhere. I have a two sentence disclosure in the footer, a link to my TOS in the sidebar, and a one sentence at the very end of the article.
 
Joined
Sep 27, 2020
Messages
19
Likes
9
Points
0
There is a way to do this. It took me a while to find this, I believe the google page is titled “preparing for a crawl” that supports this.

Here is the code I use inside a gutenberg notification/info block:

Code:
<p>This is normal (X)HTML content that will be indexed by Google.</p>

<!--googleoff: index-->

<p>This (X)HTML content will NOT be indexed by Google.</p>

<!--googleon: index>
 

Ryuzaki

お前はもう死んでいる
Staff member
BuSo Pro
Digital Strategist
Joined
Sep 3, 2014
Messages
4,421
Likes
8,514
Points
8
@AhFreshMeat, that doesn't work for anything but Google Search Appliance (your own internal search results on your site). It doesn't work for web search, sadly. I found that in the past and wanted it to exist so badly.

I think the case is the same for @SisypheanTask's method with data-nosnippet, too. I think it's because meta descriptions aren't considered a "snippet". I hope I'm wrong on that. I searched the topic and found people saying both sides of the argument are true, which usually means that it's not true. If anyone tests it, please report back and let us know how it goes.
 
Joined
Sep 27, 2020
Messages
19
Likes
9
Points
0
Right now its working for me though, it’s skipping the affiliate disclosure and using my intro as the meta description when I search the intended query for this article. (I didnt set a custom meta description)

Perhaps if someone else could attempt and confirm it works for them too? Its possible different page builders could effect this, in theory.

-----

Confirmed working for me