-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
79 lines (72 loc) · 2.16 KB
/
index.php
File metadata and controls
79 lines (72 loc) · 2.16 KB
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
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
<link rel="shortcut icon" href="http://cdn.productivitytools.tech/images/PT/ProductivityTools_green_40px_3.png" type="image/x-icon">
<?php wp_head(); ?>
<title>
<?php bloginfo('name'); ?>
</title>
<header>
<div class="middleColumn">
<div class="topLogo">
<img src="http://cdn.productivitytools.tech/images/PT/ProductivityTools_white_transparent_53px_2.png">
</div>
<div class="textLogo">
<h1><a href="/"><?php bloginfo('name'); ?></a></h1>
<small><?php bloginfo('description'); ?></small>
</div>
</div>
</header>
<?php if(has_nav_menu('primary')): ?>
<nav class="main-nav">
<div class="container middleColumn">
<?php $args = array('theme_location' => 'primary'); ?>
<?php wp_nav_menu($args); ?>
</div>
</nav>
<?php endif;?>
</head>
<body>
<div class="middleColumn" id="content">
<div class="articles">
<?php if(have_posts()): ?>
<?php while(have_posts()): the_post(); ?>
<article class="post">
<p class="article-category">
<?php
$categories = get_the_category();
$separator = ", ";
$output = 'Category: ';
if($categories){
foreach($categories as $category){
$output .= '<a href="'.get_category_link($category->term_id).'">'.
$category->cat_name.'</a>'.$separator;
}
}
echo trim($output, $separator);
?>
</p>
<h3>
<a href="<?php the_permalink(); ?>">
<?php the_title();?>
</a>
</h3>
<?php the_content("(...)"); ?>
</article>
<?php endwhile;?>
<?php else: ?>
<?php echo wpautop('Sorry, No posts were found');?>
<?php endif; ?>
<?php echo do_shortcode('[ajax_load_more container_type="div" post_type="post" scroll="false" button_label="More" offset="5"]'); ?>
</div>
<div class="sidebar">
<?php if(is_active_sidebar('sidebar')) : ?>
<?php dynamic_sidebar('sidebar'); ?>
<?php endif; ?>
</div>
</div>
<?php wp_footer(); ?>
</body>
</html>