1.wordpress首页分类栏目在网站后台哪里填写呢
你贴的代码是样式表代码!不是修改这个的!看一下这段介绍吧:Gvan-Y主题includes文件夹里的文件: 1.admin.php:边栏小工具-前台控制面板。
包括:管理、文章、工具、评论 、主题、插件、挂件、链接、媒体、设置等等,该小工具只有管理员或用户登录后可看到的。 2.pic-column.php:图片展示板块,修改其中分类的ID可展示你需要展示的分类目录下的图片。
3.slide.php:首页焦点图片展示(幻灯片) 4.cats-column.php:首页CMS布局。该板块分上下两部分,代码中有两个array(1,3,4,5)数组,array中是要显示的分类ID,分两部分是因为中间有可插入广告的地方。
5.seo.php:后台SEO设置的代码,在后台设置中可以填写网站关键字和网站描述。 6.switch-tab.php:首页的最新、热评、推荐文章板块 7.statistics.php:边栏小工具:网站统计。
包括日志总数、分类总数、标签数、友情链接数、网站运行天数等等。此栏目和admin.php一样只有登录的状态才能看到。
你也可以把代码中的开始部分:<?php global="" $user_identity,$user_level;="" get_currentuserinfo();="" if="" ($user_identity)="" {="" ?=""> 和结束的代码:<?php }="" ?="">删除,这样不需要登录就可以看到了。 8.thumbnail.php和thumbnail_s.php:文章缩略图的相关代码 9.topnav.php:网站顶部栏目:设为首页、添加收藏、登陆登出和当前时间。
10.search.php:导航菜单右边的搜索 wordpress模板其他文件说明: 1.about.php:关于页面模板 2.links.php:友情链接页面模板 3.theme-options.php:主题选项设置 4.guestbook.php:留言版页面模板。
2.wordpress主题首页最近更新栏目无法显示文章,急
先判断下是否登录,然后获取当前用户对象,然后获取当前用户对象的信息,需要哪些用哪些:
if(is_user_logged_in()){
$current_user = wp_get_current_user();
/**
* @example Safe usage: $current_user = wp_get_current_user();
* if ( !($current_user instanceof WP_User) )
* return;
*/
echo 'Username: ' . $current_user->user_login . '<br />';
echo 'User email: ' . $current_user->user_email . '<br />';
echo 'User first name: ' . $current_user->user_firstname . '<br />';
echo 'User last name: ' . $current_user->user_lastname . '<br />';
echo 'User display name: ' . $current_user->display_name . '<br />';
echo 'User ID: ' . $current_user->ID . '<br />';
}
3.wordpress 首页调用文章自定义栏目
' ); endif; // 在标题后面加标识,放在哪里自已定 // 图片放在哪,这个判断就可以放在哪 if ( $meta ) echo "这个文章有教程"; ?> <?php // End the loop. endwhile; endif; ?>这是主循环的示例代码,放于当前皮肤的index.php里。
其实就是在主循环内添加获取meta_key为jumpdown_help的值,如果有则显示想要的提示。 $meta = get_post_meta( $post->ID, 'jumpdown_help', true );if ( $meta ) echo "这个文章有教程";。
转载请注明出处51数据库 » wordpress首页栏目
?php>?php>
嗫?暁雲?