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

plugins - Reading Custom Post data so I can have user update Manually

programmeradmin1浏览0评论

Sorry if this sounds like a newbie question. However, I am currently building a site and I am using a plugin called SportSpress and they create some custom post types in the there plugin. I am Wondering is there away I can find out what data or fields they are using so I can create a form on the front end to allow users to update?

Sorry if this sounds like a newbie question. However, I am currently building a site and I am using a plugin called SportSpress and they create some custom post types in the there plugin. I am Wondering is there away I can find out what data or fields they are using so I can create a form on the front end to allow users to update?

Share Improve this question asked Jun 21, 2019 at 20:33 Mark IvanowskiMark Ivanowski 1
Add a comment  | 

1 Answer 1

Reset to default 0

Have a look at the database. There are only two places to store data for a post type. Let’s assume the post type is called FRANK have a look at the wp_posts table and run

SELECT * FROM wp_posts WHERE post_type = ‘FRANK’

The second place to store data is the wp_postmeta table. Use one of the IDs (e.g. 9999 in this example) you received in previous statement and use it in this query to get all meta fields for this post

SELECT *
FROM wp_postmeta
WHERE post_id=9999

You can also combine both with a JOIN but in my opinion it’s easier to understand like that

发布评论

评论列表(0)

  1. 暂无评论