forked from glocalcoop/anp-network-main-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-network.php
99 lines (62 loc) · 2.19 KB
/
single-network.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php get_header(); ?>
<header class="header-local">
<div class="wrap">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article" itemscope itemtype="http://schema.org/BlogPosting">
<?php $meta = get_post_meta(get_the_ID()); ?>
<header class="network-header">
<ul class="social-links">
<?php
$facebook_url = get_post_meta($post->ID, 'glocal_facebookurl', true );
$twitter_url = get_post_meta($post->ID, 'glocal_twitterurl', true );
if($facebook_url) {
echo '<li class="facebook icon"><a href="' . $facebook_url . '"><span> </span></a></li>';
}
if($twitter_url) {
echo '<li class="twitter icon"><a href="' . $twitter_url . '"><span> </span></a></li>';
}
?>
</ul>
<?php if ( has_post_thumbnail() ) { ?>
<div class="network banner"><?php the_post_thumbnail('full'); ?></div>
<?php } else { ?>
<div class="network no-banner"> </div>
<?php } ?>
<h1 class="entry-title single-title" itemprop="headline"><?php the_title(); ?></h1>
</header>
</article>
<?php endwhile; ?>
<?php endif; ?>
</div>
</header>
<div class="content">
<div class="wrap">
<?php get_sidebar ('site_networks'); ?>
<main class="main-network" role="main">
<h4 class="subtitle">News in this network</h4>
<?php
$blog_ids = get_post_meta($post->ID, 'glocal_network_sites');
$blog_list = implode(",", $blog_ids);
if(function_exists( 'network_latest_posts' )) {
$parameters = array(
'title' => '',
'title_only' => 'false',
'auto_excerpt' => 'true',
'full_meta' => 'true',
'display_type' => 'ulist',
'thumbnail' => 'true',
'thumbnail_wh' => 'medium',
'thumbnail_class' => 'post-img',
'wrapper_block_css'=> 'network-posts', // wrapper class to add
'instance' => 'network-posts', // wrapper id to add
'blog_id' => $blog_list,
'number_posts' => '25',
);
// Execute
$posts = network_latest_posts($parameters);
}
?>
</main>
</div>
</div>
<?php get_footer(); ?>