1,在functions.php增加如下内容: add_theme_support( 'post-formats', array( 'aside', 'chat','gallery','image','link', 'quote', 'status', 'video', 'audio' ) ); 2,把文章样式给文章样式类页面 add_post_type_support( 'page', '...
1,在functions.php增加如下内容: add_theme_support( 'post-formats', array( 'aside', 'chat','gallery','image','link', 'quote', 'status', 'video', 'audio' ) ); 2,把文章样式给文章样式类页面 add_post_type_support( 'page', '...
document.getElementById(ckb[i]).style.background = "url(image/ku.png) -8px -64px no-repeat"; 如果有引号将没有报错,并且设置样式不成功
这个是把方法名写在后面,如果写括号就是赋值了 selection1.onclick = clickHander; selection2.onclick = function(){ alert('答案2注册函数'); }attachEvent方法 按钮onclick IE中使用 addEventListener方法 按钮click fox中使用
Add_management_page() 在Tools下面创建 Add_options_page() 在Settings下面创建 Add_theme_page() 在Appearance下面创建 Add_users_page() 在Users下面创建 Add_dashboard_page() 在Dashboard下面创建 ...
WordPress中的 Hook 有两种,分别是”Action Hook“及”Filter Hook“,我们刚才举例的 wp_head 及wp_footer 都是属於 Action Hook。不过,一开始你可以先把这两种 Hook 看成是一样的东西,只是 Filter 多了一点点不同的特色,接着说明。Action HookWP核心 (或主题、插件)在做它们该做的事时,如果执行到有埋 acti...
对于wordpress主题开发者来说,客户的要求可谓是五花八门,他们什么样的要求都会出现。本章就拿我的一个客户要求来说事——对方想让文章发表出来是固定格式的,对方是一家企业客户。就是说,文章发表出来后,不是普通文章那样,而是让这篇文章按固定的布局来显示,也就是我们今天要讲的“让wordpress主题实现编辑器分区域编辑文章”(如下图,一个简单的编辑器布局)。怎样实现文章区域格式化呢?下面就随...
var eventOne = function(){ alert("第一个监听事件"); } function eventTwo(){ alert("第二个监听事件"); } window.onload = function(){ var btn = document.getElementById("yuanEvent"); //addEventListener:绑定函数 btn.addEv...
dl 列表(list) dt 标题(title) dd 数据(data)(网上见为description)(但是他貌似可以传value)
function surroundContent() { var r; if (document.selection) { r = document.selection.createRange(); if (r.text != '') r.pasteHTML('' + r.text + '') ...