Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getTratamientos() {
- $tratamientos = new WP_Query( 'post_parent=51');
- if ( $tratamientos->have_posts() ) {
- while ( $tratamientos->have_posts() ) {
- echo "<div>";
- echo "<h3>".$tratamientos->get_the_title()."</h3>";
- echo "<p>".$tratamientos->get_the_excerpt()."</p>";
- echo "<a href=\"".$tratamientos->get_the_permalink()."\">[Seguir leyendo]</a>";
- echo "</div>";
- }
- }
- }
- add_shortcode('tratamientos','getTratamientos');
Advertisement
Add Comment
Please, Sign In to add comment