-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-post-revista.php
75 lines (61 loc) · 2.05 KB
/
single-post-revista.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
<?php
$connected = new WP_Query( array(
'connected_type' => 'revista_posts',
'connected_items' => get_queried_object(),
'nopaging' => true,
) );
if ( $connected->have_posts() ) :
while ( $connected->have_posts() ) :
$connected->the_post();
$revista_header = get_field('revista_header');
$revista_permalink = get_permalink();
$revista_thumbnail = get_the_post_thumbnail(get_the_ID(),'small');
$revista_title = get_the_title();
endwhile;
wp_reset_postdata();
endif;
?>
<div class="page-title" style="background-image: url(<?php echo $revista_header["url"]; ?>);">
<div class="w-container">
<h2 class="page-title-subheading"><?php echo get_the_category()[0]->name; ?></h2>
<h1 class="post-title-heading"><?php the_title(); ?></h1>
</div>
</div>
<div>
<div class="post-wrapper w-container">
<div class="w-dyn-list">
<div class="w-dyn-items">
<?php
$connected = new WP_Query( array(
'connected_type' => 'post_divas',
'connected_items' => get_queried_object(),
'nopaging' => true,
) );
if ( $connected->have_posts() ) :
?>
<?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
<div class="w-dyn-item">
<a href="<?php the_permalink(); ?>" class="simple-link post-diva-autora">
<?php the_title(); ?>
</a>
</div>
<?php endwhile; ?>
<?php
wp_reset_postdata();
endif;
?>
</div>
</div>
<div class="spacer"></div>
<div class="post-body w-richtext"><?php the_content(); ?></div>
<div class="spacer"></div>
<div class="spacer"></div>
<a href="<?php echo $revista_permalink; ?>" class="link-block-2 w-inline-block">
<figure class="post-related-revista"><?php echo $revista_thumbnail; ?></figure>
</a>
<div class="div-block">
<div>Voltar para</div>
<a href="<?php echo $revista_permalink; ?>"><?php echo $revista_title; ?></a>
</div>
</div>
</div>