3 Star 29 Fork 7

iowen / WebStack

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.php 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
owen0o0 提交于 2020-02-23 00:05 . 添加公告和友情链接模块
<?php if ( ! defined( 'ABSPATH' ) ) { exit; }?>
<?php get_header();?>
<?php
$categories= get_categories(array(
'taxonomy' => 'favorites',
'meta_key' => '_term_order',
'orderby' => 'meta_value_num',
'order' => 'desc',
'hide_empty' => 0,
)
);
include( 'templates/header-nav.php' );
?>
<div class="main-content">
<?php include( 'templates/header-banner.php' ); ?>
<?php get_template_part( 'templates/bulletin' ); ?>
<?php
if(io_get_option('is_search')){include('search-tool.php'); }
else{?>
<div class="no-search"></div>
<?php
}
?>
<div class="sites-list" style="margin-bottom: 8.5rem;">
<?php if(!wp_is_mobile() && io_get_option('ad_home_s')) echo '<div class="row"><div class="ad ad-home col-md-6">' . stripslashes( io_get_option('ad_home') ) . '</div><div class="ad ad-home col-md-6 visible-md-block visible-lg-block">' . stripslashes( io_get_option('ad_home') ) . '</div></div>'; ?>
<?php
foreach($categories as $category) {
if($category->category_parent == 0){
$children = get_categories(array(
'taxonomy' => 'favorites',
'meta_key' => '_term_order',
'orderby' => 'meta_value_num',
'order' => 'desc',
'child_of' => $category->term_id,
'hide_empty' => 0
)
);
if(empty($children)){
fav_con($category);
}else{
foreach($children as $mid) {
fav_con($mid);
}
}
}
}
get_template_part( 'templates/friendlink' );
?>
</div>
<?php
get_footer();
PHP
1
https://gitee.com/iowen/WebStack.git
git@gitee.com:iowen/WebStack.git
iowen
WebStack
WebStack
master

搜索帮助