• Resolved vvpptt

    (@vvpptt)


    Hi,
    I have made a Custom Post Type that saves the data to table.
    Now, I have added data directly (via phpmyadmin) to database table, but I can not see the data in WordPress.
    Should this work as easy or do I am missin something?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    If this is a Custom Post Type using Table-based storage, you will need to insert rows into:

    wp_posts
    wp_pods_yourcpt
    (wp_ would be your table prefix)

    You only have to insert rows into wp_pods_yourcpt if you have custom fields in that table that you want to set.

    If you have relationships, you would insert those into wp_podsrel.

    Does this clarify everything for you?

    Thread Starter vvpptt

    (@vvpptt)

    Thanks for quick reply.
    This is Custom Post type and usin Table-based storage and it have only custom fields.
    So should this work without inserting the rows ALSO to wp_posts? Or do I have to add the same rows also to wp_posts?

    What I want to do is make own table (different from wp_posts table) for about 70.000 rows. And then make listings from these rows.
    I don′t like to add them to wp_post, because this data will be updated daily and it is not good to do so in wp_posts table…

    Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    wp_posts has all of the core post information including ID, post_title, post_content, post_name, post_status, and post_type.

    You’ll need to ensure you have at minimal a row for each record in wp_posts,

    Then for the table-based custom fields, you would add ONE row per record into your wp_pods_yourcpt table using the ID from wp_posts to match them up.

    If you intended to have a table entirely outside of the WordPress posts table, you would want to enable the Advanced Content Type component from Pods Admin > Components and then create an Advanced Content Type.

    Note: Advanced Content Types do not have normal templating in WordPress like post types get.

    This comparison might help: https://docs.pods.io/creating-editing-pods/compare-content-types/

    Thread Starter vvpptt

    (@vvpptt)

    Thank you. This clarified the matter.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Updating pods via sql does not update the data in wordpress’ is closed to new replies.