How to customize default %%excerpt%% behavior by Yoast?
-
In admin setting->SEO->Search Appearance-> Content Type, I put default meta desc as “%%excerpt%%” for pages and posts. Now it pulls out from some text in all pages and put it into meta desc, but the problem is that for every pages, it pulls out texts from what I don’t want it to pull out.
I gave those sections, in which I don’t want yoast to pull out for deciding final meta description to show, specific id (like <section id=”blahblah”>) using Elementor, and I want to change Yoast’s behavior how it pulls out text in every pages so that it ignores and skip tags with specific id for pulling out. I am pretty sure I need to do some regex thing to ignore tags with specific id I set, but unsure which part of yoast or wordpress or theme sources code I need to alter in order to change default behavior of %%excerpt%% set via Yoast’s setting.
Which part of Yoast source code should I change in order to achieve this, or should I make additional snippet of php code that captures texts before yoast decides final meta description?
- The topic ‘How to customize default %%excerpt%% behavior by Yoast?’ is closed to new replies.