diff --git a/functions.php b/functions.php index e0cdd31..5c56925 100644 --- a/functions.php +++ b/functions.php @@ -61,4 +61,34 @@ class Artist_Widget extends WP_Widget { } register_widget('Program_Widget'); -register_widget('Artist_Widget'); \ No newline at end of file +register_widget('Artist_Widget'); + +function get_related_artists( $post_id) +{ + $related = get_posts( array( + 'connected_from' => $post_id, + 'nopaging' => true, + 'post_type' => 'artist', + 'suppress_filters' => false + )); + + if ( empty( $related )) + return array(); + + return $related; +} + +function get_related_events( $post_id) +{ + $related = get_posts( array( + 'connected_to' => $post_id, + 'nopaging' => true, + 'post_type' => 'event', + 'suppress_filters' => false + )); + + if ( empty( $related )) + return array(); + + return $related; +} diff --git a/single-artist.php b/single-artist.php new file mode 100644 index 0000000..ae73d49 --- /dev/null +++ b/single-artist.php @@ -0,0 +1,89 @@ + + +
+
+ + + +
> +

+ + + +
+ + '' ) ); ?> +
+ + +
+
+ +
+ +
+ +ID); + ?> + + +
+ + ', '' ); ?> +
+
+ + + + + +
+
+ + + diff --git a/single-event.php b/single-event.php new file mode 100644 index 0000000..a14d1dd --- /dev/null +++ b/single-event.php @@ -0,0 +1,88 @@ + + +
+
+ + + +
> +

+ + + +
+ + '' ) ); ?> +
+ + +
+
+ +
+ +
+ +ID); + +?> + + +
+ + ', '' ); ?> +
+
+ + + + + +
+
+ + +