-
Notifications
You must be signed in to change notification settings - Fork 3
/
page-cities.php
66 lines (59 loc) · 1.91 KB
/
page-cities.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
<?php
/*
* Template name: Miasta
*/
?>
<?php get_header() ?>
<?php $src = get_template_directory_uri(); ?>
<?php get_template_part('breadcrumbs'); ?>
<div class="row">
<?php if (have_posts()): ?>
<?php while (have_posts()): the_post(); ?>
<div class="small-12 medium-9 columns post-content">
<h1 class="page-title text-center large-text-left"><?php the_title(); ?></h1>
<div class="map show-for-large">
<img src="<?php echo $src; ?>/images/poland.jpg" />
<?php
$args = array(
'post_type' => 'cities',
'posts_per_page' => -1,
);
$query = new WP_Query($args);
?>
<?php if ($query->have_posts()): ?>
<?php while ($query->have_posts()): $query->the_post(); ?>
<a href="<?php the_permalink(); ?>" class="pin" style="left:<?php the_field('axis_x'); ?>%;bottom:<?php the_field('axis_y'); ?>%;"><img src="<?php echo $src; ?>/images/pin.png" alt="<?php the_title(); ?>" /></a>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
<div class="small-12 medium-3 columns post-author">
<?php get_template_part('sidebar-cities'); ?>
</div>
</div>
<div class="row mt40">
<div class="small-12 columns">
<h3 class="subtitle"><span><?php _e('Blog'); ?></span></h3>
</div>
</div>
<div class="row post-list mt40">
<?php
$args = array(
'post_type' => 'post',
'posts_per_page' => 3,
'cat' => icl_object_id(6,'category')
);
$query = new WP_Query($args);
?>
<?php if ($query->have_posts()): ?>
<?php while ($query->have_posts()): $query->the_post(); ?>
<?php get_template_part('post-on-list'); ?>
<?php endwhile; ?>
<?php endif; ?>
<div class="small-12 columns text-center">
<a href="<?php echo get_permalink(icl_object_id(17,'page')); ?>" class="btn red"><?php _e('Read all posts'); ?></a>
</div>
</div>
<?php get_footer() ?>