Databasemodel (WordPress): verschil tussen versies

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
Regel 48: Regel 48:
  
 
WordPress Screen Options are displayed in a hanging tab in the upper right of the WordPress dashboard. Screen Options are user specific based on your login name. They're stored in table <code>wp_usermeta</code>
 
WordPress Screen Options are displayed in a hanging tab in the upper right of the WordPress dashboard. Screen Options are user specific based on your login name. They're stored in table <code>wp_usermeta</code>
 +
 +
== Tabellen ==
 +
  
 
== Zie ook ==
 
== Zie ook ==

Versie van 3 okt 2020 14:46

Dit is het hoofdartikel rondom het databasemodel van WordPress. Dit it artikel is slechts een beginnetje. Zie sectie Zie ook voor meer.

Fields

GUID's

WordPress maintains GUID-fields, like in wp_posts. I think it's okay to update them [1]

Functies

Posting-URL

De URL van een posting (vanaf de root van de site) vind je in wp_posts in de kolom post_name [2].

WooCommerce-producten

WooCommerce-productinformatie, vind je voornamelijk op twee plekken [3]:

  • wp_posts
  • wp_postmeta

Voorbeeld: Selecteer de belangrijkste gegevens uit wp_posts en de SKU's uit wp_postmeta:

select 
    wp_posts.ID			as post_id,
    wp_posts.post_title		as post_title,
    wp_posts.post_name		as slug,
    wp_posts.guid		as guid,
    wp_postmeta.meta_value	as sku
from 
    wp_posts
join
    wp_postmeta
    on
    wp_posts.ID = wp_postmeta.post_id
where 
    post_type="product"
    and
    post_status="publish"
    and
    meta_key="_sku";

Screen Options

[4]:

WordPress Screen Options are displayed in a hanging tab in the upper right of the WordPress dashboard. Screen Options are user specific based on your login name. They're stored in table wp_usermeta

Tabellen

Zie ook

Bronnen