-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.php
66 lines (56 loc) · 2.37 KB
/
index.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 if ( ! defined( 'ABSPATH' ) ) { exit; }?>
<?php get_header();?>
<?php
include( get_theme_file_path('/templates/sidebar-nav.php') );
?>
<div class="main-content flex-fill">
<?php
get_template_part( 'templates/tools','header' );
// 加载文章模块
get_template_part( 'templates/article','list' );
// 加载热搜模块
get_template_part( 'templates/tools','hotsearch' );
// 加载文章模块
get_template_part( 'templates/tools','post' );
// 加载自定义模块
get_template_part( 'templates/tools','customize' );
// 加载热门模块
get_template_part( 'templates/tools','hotcontent' );
// 加载广告模块second
get_template_part( 'templates/ads','homesecond' );
// 加载网址模块
foreach($categories as $category) {
if($category['menu_item_parent'] == 0){
if(empty($category['submenu'])){
$terms = apply_filters( 'io_category_list', array('favorites','apps','category','books') );
if($category['type'] != 'taxonomy') {
$url = trim($category['url']);
if( strlen($url)>1 && substr( $url, 0, 1 ) != '#')
echo "<div class='card py-3 px-4'><p style='color:#f00'>“{$category['title']}”不是分类,请到菜单重新添加</p></div>";
continue;
} elseif ( $category['type'] == 'taxonomy' && in_array( $category['object'],$terms ) ){
fav_con_a($category);
} else {
echo "<div class='card py-3 px-4'><p style='color:#f00'>“{$category['title']}”不是分类,请到菜单重新添加</p></div>";
}
}else{
if(io_get_option("tab_type")) {
if(io_get_option("tab_ajax"))
fav_con_tab_ajax($category['submenu'],$category);
else
fav_con_tab($category['submenu'],$category);
}else{
foreach($category['submenu'] as $mid) {
fav_con_a($mid,$category['title']);
}
}
}
}
}
// 加载广告模块link
get_template_part( 'templates/ads','homelink' );
// 加载友链模块
get_template_part( 'templates/friendlink' ); ?>
</div>
<?php
get_footer();