Skip to content

Instantly share code, notes, and snippets.

@alandbh
Created April 18, 2017 16:04
Show Gist options
  • Save alandbh/80e2dc8941509f1c0288d9e4f05573fb to your computer and use it in GitHub Desktop.
Save alandbh/80e2dc8941509f1c0288d9e4f05573fb to your computer and use it in GitHub Desktop.
It gets the parents ID's // Pega os ID's das páginas mães
$ancestor = get_post_ancestors($post)[0];
if ($ancestor == 16349) { // se for filha de "os distritos"
echo '<h2>Localização</h2>';
include 'includes/mapa-local-atrativo.php';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment