function resto_ubicaciones($actual = false) { $ubicaciones = get_posts(array('posts_per_page' => -1, 'post_type' => 'ubicacion', 'fields' => 'ids', 'post__not_in' => array($actual))); if (!$ubicaciones) { return; } foreach ($ubicaciones as $u) { $u = new Ubicacion($u); $u->imprimir_single(false, false); } }
<?php get_header(); if (have_posts()) { while (have_posts()) { the_post(); $ubicacion = new Ubicacion($post->ID); $ubicacion->imprimir_single(false, false); } } get_footer();
<?php require_once '../../../../../wp-load.php'; if (!isset($_POST['id'])) { die; } $ubicacion = new Ubicacion($_POST['id']); $ubicacion->imprimir_single();