-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-threats.php
51 lines (48 loc) · 1.51 KB
/
page-threats.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
<?php /* Template Name: Threat List*/
get_header(); ?>
<div id="page-law-reports" <?php post_class(''); ?> id="post-<?php the_ID(); ?>">
<?php if (have_posts()) : while (have_posts()) : the_post();?>
<div class="row">
<h2 id="post-<?php the_ID(); ?>" class="col-md-10">
<?php the_title();?>
</h2>
<div class="pull-right"><?php do_action('icl_language_selector'); ?></div>
</div>
<?php the_content(); ?>
<?php endwhile; endif; ?>
<?php
$args = array(
'post_type' => 'threat',
'posts_per_page' => -1,
'post_parent' => 0,
'orderby' => 'title',
'order' => 'ASC',
);
$my_query = new WP_Query($args);
?>
<table class="table table-hover table-condensed">
<thead>
<tr>
<th><?php _e('Threats','globalrec'); ?></th>
</tr>
</thead>
<tbody>
<?php if ( $my_query->have_posts() ) : while ( $my_query->have_posts() ) : $my_query->the_post(); ?>
<?php
global $wp_query;
$wp_query->in_the_loop = true;
$more = 0; // Set (inside the loop) to display content above the more "seguir leyendo" tag.
?>
<tr>
<td> <a href="<?php the_permalink() ?>" rel="bookmark" title="Go to <?php the_title_attribute(); ?>">
<?php the_title(); ?></a>
<?php if ( is_user_logged_in() ) { ?><div class="btn btn-xs btn-default"> <?php edit_post_link(__('Edit This')); ?></div> <?php } ?>
</td>
</tr>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
</tbody>
</table>
</div>
<?php get_footer(); ?>