得到博客的首页:

<?php echo home_url( '/' ); ?>

得到模板中的CSS文件位置,image 图片的位置

<link href="<?php bloginfo('template_directory'); ?>/favicon.ico" rel="shortcut icon" type="image/x-icon" />

<img  src="<?php bloginfo('template_directory'); ); ?>/image/wordpress.png title=”good template” />

<?php wp_enqueue_script("jquery"); ?>

<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/my-theme.js"></script>

wp_enqueue_script( 'featured-slider', get_bloginfo('stylesheet_directory') . '/js/featured-slider.js', array( 'jquery', 'jquery-uicore','jquery-ui-tabs' ) );

if( !is_admin() ) {
wp_enqueue_script( 'my-theme', get_bloginfo('stylesheet_directory') .'/js/my-theme.js', $in_footer);
}

相关信息

post-<?php the_ID(); ?>">

<?php the_permalink() ?>">

<?php the_title();  ?>

the_category(", ")?>

the_content()

the_author_meta()

next_post_link()   next_post_link("<strong>%title</strong>");

comments_number()

常用的标签(循环)
<?php wp_list_pages('title_li=" ); ?>

<?php wp_get_archives('type=monthly"); ?>

wp_list_categories

显示特定的类别下的文章
<ul class='tocNav">
<?php
global $post;
$myposts = get_posts("numberposts=5&category=3");
foreach($myposts as $post):
setup_postdata($post);
?>
<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
<!—//end recent

SEO相关的标签

bloginfo() 如  bloginfo("name");

wp_title()wp_title("—",true,"");

the_title()    the_title("<h2>", "</h2>");

the_content()  the_content("more_link_text", strip_teaser, "more_file");

预定义的CSS

.aligncenter: This style is generated if you select Center. A good way to ensure this style is centered is:

.alignleft

.alignright:

div.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}

.alignleft {
float: left;
}

.alignright {
float: right;
}

In addition to the alignment, if you choose to write a caption for your image

.wp-caption: Wraps the image and the caption text in a div which also includes the alignment class from above if you selected one.

.wp-caption-text: Wraps the specific text in a p tag with this class assigned. This class appears inside the outer div with the .wp-caption class assigned to that div, like so:

Classes output by the sidebar widgets
The following classes are output by the various default widgets available in WordPress:

.widget: If you use the standard function to register a sidebar and "widigtize" your theme, this class will be appended to every <li> tag produced by a widget. You can customize the register sidebar function so that this class will not appear.

.textwidget: This class is added to text generated by the Text widget.

.blogroll: This class is generated by the Links widget (your blogroll).
It is added to the main ul wrapper.

.linkcat: This class is added to the <li> of every link that has a href link for a category.

Classes output by the wp_list_pages template tag

.page_item: This is applied to each list item tag in a page list (even page lists generated by the Page widget)

.current_page_item: This class is assigned to the currently selected page.

.current_page_parent: If the currently selected page has a parent page, that parent will have this class appended to it.

.current_page_ancestor

Classes output by the wp_list_categories template tag

.cat-item: This is applied to each li item in a category listing

.current-cat-parent: If a category is nested and selected, this will display in the li item of that parent

body_class class styles

<body <?php body_class(); ?>>

自定义

活动

Creating a custom page template

Creating a second sidebar

Creating a custom page.php template file

自定义的类别页面:

category-2.php

问题是如何在自定义的类别页面中定义自定义的内容页,标签页等

自定义的头部等

Creating custom header, footer, sidebar includes

对于多媒体类型的处理

转载于:https://www.cnblogs.com/myjavawork/archive/2012/07/30/2615777.html

wordpress and theme相关推荐

  1. uploadhandler.php,WordPress Kernel Theme ‘upload-handler.php’任意文件上传漏洞

    javascript中apply.call和bind的区别 在JS中,这三者都是用来改变函数的this对象的指向的,他们有什么样的区别呢.在说区别之前还是先总结一下三者的相似之处:1.都是用来改变函数 ...

  2. Wordpress的theme存储位置

    ordpress这些可以随时更换的主题设置: 存储地址:wp-content的themes文件夹里. 其中index.php即定义应用了这个主题后,默认显示的html模板: 要获取更多Jerry的原创 ...

  3. 25 个超棒的 WordPress 主题(2012)

    Lulu – Responsive WordPress Theme XO – Responsive Creative WordPress Theme The Arcadian Responsive W ...

  4. WordPress程序备受喜爱的原因:十八般武艺

    众所周知,WordPress是个功能强大且颇受欢迎的开源博客平台.WordPress友好的界面和操作的简便性为它带来了无数用户,WordPress甚至可以被作为内容发布系统(CMS)来使用. 当你尝试 ...

  5. 25款漂亮的 WordPress 杂志主题

    WordPress是一个免费和开源博客工具和一个内容管理系统(CMS)基于 PHP 和 MySQL,它运行在一个 Web 托管服务.每个月的 WordPress 主题是由开发人员,其中用户喜欢使用 W ...

  6. 30 个用于杂志网站的 WordPress 主题

    WordPress 已经形成了一个非常完善的生态链,为 WordPress 开发的各种插件.主题越来越丰富.本文介绍 30 个适用于杂志网站使用的 WordPress 主题,其中也包含一些收费的主题, ...

  7. 2012年最佳30款免费 WordPress 主题

    WordPress 是一个功能非常强大的博客系统,插件众多,易于扩充功能.安装和使用都非常方便,而且有许多第三方开发的免费模板,安装方式简单易用.今天为大家分享今年最佳的30款免费WordPress主 ...

  8. wordpress创建_如何创建WordPress儿童主题

    wordpress创建 I have been blogging for a long time now and I use WordPress in all my blogs. Its easy t ...

  9. 30多种免费的高级WordPress主题,适用于令人惊叹的照片,教育和房地产网站

    Premium WordPress Themes – do you want to have a modern web-resource that will promote your business ...

  10. rtl语言_21个最佳RTL WordPress主题(从右到左语言)

    rtl语言 Are you looking for the best WordPress RTL themes? 您是否在寻找最佳的WordPress RTL主题? RTL (Right to Lef ...

最新文章

  1. 【董天一】IPFSFilecoin和复制证明
  2. 顺序队列之C++实现
  3. Leetcode 215.数组中第k个最大元素 (每日一题 20210713)
  4. 禁止linux使用密码ssh,linux centos7服务器使用密钥登录ssh同时禁止root密码登录
  5. matlab画曲面二次,如何用matlab绘制二次B样条三维曲面(已知控制点和节点矢量)?...
  6. 微软亚太区资料科学总监:R 语言是 VS 生态第一顺位
  7. notepad python设置_NotePad++上配置Python
  8. 实践 Redux,第 1 部分: Redux-ORM 基础
  9. LINUX文件的压缩与打包
  10. [导入]Linq学习笔记(2.2)——深入DLinq查询
  11. ant a-table 表格数据同步
  12. UVa 591-Box of Bricks
  13. VGG-16网络结构详解
  14. activemq下载安装
  15. exls表格搜索快捷键_excel表格查找数据查找出来的-如何在一份Excel表格中进行快速查找,快捷键是?...
  16. Xiuno BBS 4.0 修改时间显示
  17. 贝壳ip连接服务器没响应,贝壳物联通讯协议TCP连接测试教程
  18. linux grub 编辑器,KGRUBEditor: 可视化的 GRUB 编辑器
  19. C 宇恒棋 大力猜想 神奇数学
  20. 如何提升Google排名?

热门文章

  1. 期望dp+高斯消元——bzoj3143
  2. C++ GUID和string转化函数【转载】
  3. 安卓IOS 手机添加O365 邮箱账户
  4. 接口测试-jmeter
  5. python---小技巧
  6. 寫下來,免得下次又忘了
  7. php使用RabbitMQ
  8. 《FDTD electromagnetic field using MATLAB》读书笔记之一阶、二阶偏导数差商近似
  9. QT分析之QApplication的初始化
  10. 入门命令5-流程跳转:goto