From 463be5995a33eba2d1f7fc984d09e30423921b98 Mon Sep 17 00:00:00 2001 From: Vasil Kolev Date: Mon, 19 Oct 2015 21:14:48 +0300 Subject: [PATCH] add proper links to the speakers page --- page-schedule.php | 28 +++++++++++++++++++++++++++- schedule/parse.php | 2 +- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/page-schedule.php b/page-schedule.php index 7fd5c57..7e23a92 100644 --- a/page-schedule.php +++ b/page-schedule.php @@ -1,6 +1,32 @@ $s_slug, + 'post_type' => 'page', + 'numberposts' => 1 +); + +$url = ''; + +$my_posts = get_posts($args); +if( $my_posts ) { + $url = get_permalink( $my_posts[0]->ID ); +} + $content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARATOR . 'parse.php'; //var_dump($data); ?> @@ -25,7 +51,7 @@ $content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARA diff --git a/schedule/parse.php b/schedule/parse.php index e58e2ec..a237e91 100644 --- a/schedule/parse.php +++ b/schedule/parse.php @@ -67,7 +67,7 @@ foreach ($data['slots'] as $slot_id => $slot) { } else { /* TODO: fix the URL */ $name = $data['speakers'][$uid]['first_name'] . ' ' . $data['speakers'][$uid]['last_name']; - $spk[$uid] = '' . $name . ''; + $spk[$uid] = '' . $name . ''; } } $speakers = implode (', ', $spk);