๐๐ฑ๐ฑ ๐ฆ๐ฐ๐ต๐ฒ๐บ๐ฎ ๐๐ผ ๐ช๐ผ๐ฟ๐ฑ๐ฃ๐ฟ๐ฒ๐๐ ๐ช๐ถ๐๐ต๐ผ๐๐ ๐ฃ๐น๐๐ด๐ถ๐ป๐
Most guides tell you to use plugins for schema markup. Plugins slow your site. They add bloat. They conflict with themes.
You do not need a plugin. You want full control.
Use a child theme first. Editing parent themes deletes your work during updates.
Three ways to add schema:
- Use functions.php. Use the wp_head hook. This works for sitewide schema.
- Edit header.php. Paste the code before the closing head tag.
- Use the Block Editor. Add a Custom HTML block. This works for single pages.
Validate your schema. Do not skip this step.
- Use the Schemify Validator.
- Use Google Rich Results Test.
- Monitor Google Search Console.
Avoid these mistakes:
- Forgetting to escape quotes in PHP.
- Putting schema in the body instead of the head.
- Using the same schema on every page.
Use a staging site. A PHP error causes a white screen. Test changes before they go live.
Source: https://dev.to/schemify/how-to-add-schema-markup-to-wordpress-without-a-plugin-1hhb