get_the_ID() (funzione WordPress) restituisce l’ID del post corrente.
tips&tricks
La differenza tra la funzione get_the_ID() e the_ID() consiste nel fatto che la prima restituisce il valore mentre la seconda lo visualizza (echo).
Sintassi
get_the_ID()
| parametro | descrizione |
|---|---|
| – | Nessuno |
Esempi
get_the_ID(); /* RISULTATO XXX */
0 Comment