最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

mysql - Extract all users along with yoast metadata description

programmeradmin2浏览0评论

We currently have a authors list page which shows all users which have at least 1 published post.

Within this page I'd like to also show the description of the user, but take this from the metadata description field which Yoast SEO plugin adds to we don't have to duplicate data.

From what I've been told "The author meta description added with Yoast SEO can be found in the wp_usermeta table, with the meta_key wpseo_metadesc. Hopefully, this helps your developer extract it and use it on your website."

So is there a way in wordpress to perform the following query:

  1. selects the users id, firstname, lastname, email address and the wpseo_metadesc
  2. where the user has at least one published post.

Thanks Scott

We currently have a authors list page which shows all users which have at least 1 published post.

Within this page I'd like to also show the description of the user, but take this from the metadata description field which Yoast SEO plugin adds to we don't have to duplicate data.

From what I've been told "The author meta description added with Yoast SEO can be found in the wp_usermeta table, with the meta_key wpseo_metadesc. Hopefully, this helps your developer extract it and use it on your website."

So is there a way in wordpress to perform the following query:

  1. selects the users id, firstname, lastname, email address and the wpseo_metadesc
  2. where the user has at least one published post.

Thanks Scott

Share Improve this question asked Jul 4, 2019 at 13:03 ScottScott 101
Add a comment  | 

1 Answer 1

Reset to default 0

After a bit of research, this can be achieved by using the function https://developer.wordpress/reference/functions/get_user_meta/

发布评论

评论列表(0)

  1. 暂无评论