Question

En supposant que je sais que l'ID de fixation d'image, comment puis-je obtenir le permalien poste auquel est attaché (le cas échéant)?

Était-ce utile?

La solution

En gros ceci:

$parent = get_post_field( 'post_parent', $id);
$link = get_permalink($parent);
Licencié sous: CC-BY-SA avec attribution
Non affilié à wordpress.stackexchange
scroll top