SHOW:
|
|
- or go back to the newest paste.
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | function getTratamientos() {
| |
| 5 | $tratamientos = new WP_Query( 'post_parent=51'); | |
| 6 | - | echo "<h3>".$tratamientos->post_title."</h3>"; |
| 6 | + | |
| 7 | while ( $tratamientos->have_posts() ) {
| |
| 8 | - | echo "<a href=\"".$tratamientos->get_page_link()."\">[Seguir leyendo]</a>"; |
| 8 | + | |
| 9 | echo "<h3>".$tratamientos->get_the_title()."</h3>"; | |
| 10 | echo "<p>".$tratamientos->get_the_excerpt()."</p>"; | |
| 11 | echo "<a href=\"".$tratamientos->get_the_permalink()."\">[Seguir leyendo]</a>"; | |
| 12 | echo "</div>"; | |
| 13 | } | |
| 14 | } | |
| 15 | } | |
| 16 | add_shortcode('tratamientos','getTratamientos'); |