diff --git a/src/wp-content/themes/double-r-group/framework/custom_shortcodes.php b/src/wp-content/themes/double-r-group/framework/custom_shortcodes.php index ec75b83..ca20102 100644 --- a/src/wp-content/themes/double-r-group/framework/custom_shortcodes.php +++ b/src/wp-content/themes/double-r-group/framework/custom_shortcodes.php @@ -26,13 +26,9 @@ add_shortcode('horse_family_tree', 'drg_horse_family_tree'); function drg_horse_family_tree($atts, $content = null) { global $post; $html = ''; - - extract(shortcode_atts(array( - 'horse_id' => $post->ID, - ), $atts)); - + $query_atts = array( - 'p' => $atts['horse_id'], + 'p' => empty($atts['horse_id']) ? $post->ID : $atts['horse_id'], 'post_type' => 'drg_horse', 'paged' => 1, 'posts_per_page' => 1, @@ -40,10 +36,11 @@ function drg_horse_family_tree($atts, $content = null) { wp_reset_query(); $horses = new WP_Query($query_atts); + $html .= '
'; - while($horses->have_posts()): $horses->the_post(); + while($horses->have_posts()): $horses->the_post(); $html .= '' . get_the_title() . ''; // Padres @@ -58,10 +55,10 @@ function drg_horse_family_tree($atts, $content = null) { $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_paternal_grandfather', true) . ''; // Bisabuelos paternos (1) - $html .= '
'; - $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_paternal_great_grandfather_1', true) . '
'; - $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_paternal_great_grandmother_1', true) . '
'; - $html .= '
'; +// $html .= '
'; +// $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_paternal_great_grandfather_1', true) . '
'; +// $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_paternal_great_grandmother_1', true) . '
'; +// $html .= '
'; $html .= '
'; // Abuelo paterno @@ -69,10 +66,10 @@ function drg_horse_family_tree($atts, $content = null) { $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_paternal_grandmother', true) . ''; // Bisabuelos paternos (2) - $html .= '
'; - $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_paternal_great_grandfather_2', true) . '
'; - $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_paternal_great_grandmother_2', true) . '
'; - $html .= '
'; + // $html .= '
'; + // $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_paternal_great_grandfather_2', true) . '
'; + // $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_paternal_great_grandmother_2', true) . '
'; + // $html .= '
'; $html .= '
'; // Abuela paterna @@ -88,10 +85,10 @@ function drg_horse_family_tree($atts, $content = null) { $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_maternal_grandfather', true) . ''; // Bisabuelos paternos (1) - $html .= '
'; - $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_maternal_great_grandfather_1', true) . '
'; - $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_maternal_great_grandmother_1', true) . '
'; - $html .= '
'; +// $html .= '
'; +// $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_maternal_great_grandfather_1', true) . '
'; +// $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_maternal_great_grandmother_1', true) . '
'; +// $html .= '
'; $html .= '
'; // Abuelo materno @@ -99,10 +96,10 @@ function drg_horse_family_tree($atts, $content = null) { $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_maternal_grandmother', true) . ''; // Bisabuelos naternos (2) - $html .= '
'; - $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_maternal_great_grandfather_2', true) . '
'; - $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_maternal_great_grandmother_2', true) . '
'; - $html .= '
'; +// $html .= '
'; +// $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_maternal_great_grandfather_2', true) . '
'; +// $html .= '
' . get_post_meta(get_the_ID(), 'drg_horse_maternal_great_grandmother_2', true) . '
'; +// $html .= '
'; $html .= '
'; // Abuela paterna diff --git a/src/wp-content/themes/double-r-group/partials/horse-list.php b/src/wp-content/themes/double-r-group/partials/horse-list.php index fd89617..642e6a5 100644 --- a/src/wp-content/themes/double-r-group/partials/horse-list.php +++ b/src/wp-content/themes/double-r-group/partials/horse-list.php @@ -223,12 +223,12 @@

ID, 'horse_breeds', '', ', ', ' '); $term_list .= get_the_term_list($post->ID, 'horse_ages', '', ', ', ' '); $term_list .= get_the_term_list($post->ID, 'horse_genders', '', ', ', ''); ?> -

+