Plugin: Yoast SEO

Plugin: Yoast SEO

Convenient additions

Introduction of custom SEO variables

I am improving new with new SEO variables like {{~}} which contains the most notable value from vouchers.

When changing SEO variable name, use this command:

UPDATE wp_postmeta
 SET meta_value = REPLACE(meta_value, '%%~%%', '{{~}}')
 WHERE  meta_value LIKE '%%%~%%%';

Yoast SEO in Custom Types

To at least enable Yoast SEO in a post type make sure you set your post type to 'public' => true.

No meta desc in custom taxonomies

As taxonomies don’t have Excerpt field, they also don’t have automatic SEO meta description. I can use variable in defaults of Yoast, but then description is very long and Google will form that anyway just much more appropriate.

It is working when its manualy entered in SEO metabox in taxonomy itself; just atomatic generation is not working.

Where are variables stored

For posts, meta titles are stored in wp_postmeta, as expected.

SELECT * FROM wp_postmeta WHERE meta_key LIKE '_yoast_wpseo%'
// DELETE FROM wp_postmeta WHERE meta_key LIKE '_yoast_wpseo%'

Interesting metas are: _yoast_wpseo_title and _yoast_wpseo_metadesc

SELECT p.post_type, COUNT(p.post_type)
FROM etkwp_postmeta AS m
JOIN etkwp_posts AS p 
WHERE `meta_key` = '_yoast_wpseo_title' AND p.ID = m.post_id
GROUP BY p.post_type

As for taxonomies, meta titles are stored as option wpseo_taxonomy_meta in wp_options table, as serialized array.

SELECT * FROM etkwp_options WHERE option_name LIKE 'wpseo_%'

Here is how to show, or remove, specific meta titles for post type shop:

SELECT p.post_title, p.post_type, m.meta_value
FROM etkwp_postmeta AS m
JOIN etkwp_posts AS p 
WHERE m.meta_key = '_yoast_wpseo_title' AND p.ID = m.post_id AND p.post_type = 'shop'

Extend Yoast Javascript part

mb-yoast-seo/script.js at master · rilwis/mb-yoast-seo Yoast/YoastSEO.js Yoast SEO: Developer Beta • Yoast Dev Blog The examples in the file are not complete / correct · Issue #181 · Yoast/YoastSEO.js YoastSEO.js/ at master · Yoast/YoastSEO.js wordpress-seo/wp-seo-shortcode-plugin.js at 3.0 · Yoast/wordpress-seo YoastSEO.js design decisions • Yoast Dev Blog

date 25. Dec 2015 | modified 10. Jun 2024
filename: Plugins » SEO » Yoast SEO