0
votes

As the question asks, I'm trying to understand one thing, as this is a popular of the fields within the table, but I can't understand their usefulness.

global $wpdb;
$wpdb->insert(
    $wpdb->postmeta,
    array(
        'post_id' => '1',
        'meta_key' => 'address',
        'meta_value' => '1428 Elm St.'
    ),
    array(
        '%d',
        '%s',
        '%s'
    )
);

One thing is the post-table table?

What is the use of this table as in the previous case, for the seo?

in my searches on google, I saw that setting the correct tags, involves a better indexing by google, and for this there is a truly spectacular tool, which allows you to have access by entering the word of the topic we want to write like post and get all the queries, that people type more on google: (https://answerthepublic.com/)

but setting tags and populating the postmeta table are not the same thing?

What is the utility of populating with a code like the postmeta table before?

1
Your question isn't very clear. Are you asking what is postmeta used for?GMarco24

1 Answers

0
votes

Its NOT for SEO. Its for custom fields. On WP by default for posts and pages you have wp-post table, that tables has following columns (https://i.imgur.com/NCBslgq.png) for expanding functionality and adding extra custom fields WP has other table wp-postmeta (meta_id, post_id, meta_key, meta_value). So if you want add address field to post or custom post, you attaching meta field to that post using add_post_meta() https://codex.wordpress.org/Function_Reference/add_post_meta