-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
executable file
·81 lines (81 loc) · 2.67 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php get_header(); ?>
<div id="content">
<div id="inner-content" class="wrap clearfix">
<div id="main" class="clearfix main-index" role="main">
<h5 class="mini-title">Latest Works Added</h5>
<?php
$args = array('post_type' => 'work', 'posts_per_page' => 10, 'paged' => $paged);
$the_query = new WP_Query( $args );
?>
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<article id="post-<?php the_ID(); ?>" class="fourcol home-article" role="article">
<a href="<?php echo the_permalink();?>">
<table class="table">
<tbody>
<tr>
<td><h3>Title</h3></td>
<td><h3><?php the_title(); ?></h3></td>
</tr>
<tr>
<td><h3>Author</h3></td>
<?php
require_once'wp-content/themes/p-dpa/rdfa/lib/arc2/ARC2.php';
include_once('wp-content/themes/p-dpa/rdfa/connect_to_store.php');
// All Authors
$query = '
'.my_vocabs_query().'
SELECT distinct ?url ?name
WHERE {
<'.get_permalink().'> dcterms:creator ?url .
?url foaf:name ?name
}
ORDER BY ?name
';
$result = $store->query($query, 'rows'); ?>
<td>
<?php
if (!empty($result)) {
echo '<h3>';
$names = array();
foreach ($result as $row) {
array_push($names, $row['name']);
}
echo implode(', ', $names);
} ?>
</td>
</tr>
<?php
$first_image = catch_that_image();
if ($first_image != '') { ?>
<tr>
<td colspan="2" class="img">
<img src="<?php echo $first_image;?>" alt="<?php the_title(); ?>" />
</td>
</tr>
<?php } ?>
</tbody>
</table>
</a>
</article>
<?php endwhile; ?>
<?php else: ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
</div>
<nav class="page-navigation">
<?php
$big = 999999999; // need an unlikely integer
echo paginate_links( array(
'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ),
'current' => max( 1, get_query_var('paged') ),
'prev_text' => __('« Previous'),
'next_text' => __('Next »'),
'total' => $the_query->max_num_pages
) );
?>
<?php wp_reset_query(); ?>
</nav>
</div>
</div>
<?php get_footer(); ?>