The first: the output directly to the page address in the page <script> var themeurl = <? php bloginfo ('template_directory')?> </ script> This themeurl variables can be referenced directly in the page The second: style.css file in the test head to obtain the directory (the address directly on the need to reference the js file [...]
Widgets We all know the background in the WordPress default generally comes in the category, text, calendar, recent comments that some small tools. But sometimes the personality for a WordPress theme, these default widgets obviously can not meet demand, so we need to customize some of the widgets for your topic. Now, let us see [...]
We know that, like some of CSS3 border-radius properties that even in the advanced Firefox, Chrome and other browsers are not directly supported, must be added-moz-,-webkit-prefix private property so we can let the browser their support. But unfortunately, in the style sheet with the private property after the W3C validation can not, CSS2.0 that our [...]
first: premise: load jQuery library 1. functions.php in the theme of which add the following function code: Show get_bloginfo ('template_directory') values function theme_file_url () { if (isset ($ _GET ['action'])&& $ _GET [' action '] ==' theme_file_url ') { nocache_headers (); / / (FIX for IE) echo get_bloginfo ('template_directory'); die (); } } add_action ('init', [...]
WordPress theme functions.php first insert the following function: function time_diff ($ time_type) { switch ($ time_type) { case 'comment': / / If it is time for comments $ Time_diff = current_time ('timestamp') – get_comment_time ('U'); if ($ time_diff <= 86400) / / 24 hours echo human_time_diff (get_comment_time ('U'), current_time ('timestamp')).' before'; / / display format [...]
HTML part: <ul id="resizer"> <li id="f_text"> font size: </ li> <li id="f_s"> <a href="javascript:void(0)"> small </ a> </ li> <li id="f_m"> <a href="javascript:void(0)"> in </ a> </ li> <li id="f_l"> <a href="javascript:void(0)"> big </ a> </ li> </ ul> Then do not forget to introduce jQuery library, this is not to say, just a reminder, [...]
Add code blow into your header.php <script type="text/javascript"> function addLink() { var body_element = document.getElementsByTagName('body')[0]; var selection; selection = window.getSelection(); var pagelink = " Add your Copyright text here!"; var copytext = selection + pagelink; var newdiv = document.createElement('div'); newdiv.style.position='absolute'; newdiv.style.left='-99999px'; body_element.appendChild(newdiv); newdiv.innerHTML = copytext; [...]
Recent Comments