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; [...]
First, the presentation of the HTML part (with its own specific css style defined), each message with <span> </ span> enclose (of course you can use <li> </ li>, change it to html and jQuery code) <div class="test1"> <! – Style = "display: none ;"—- style.css -> <span> *****</ span> <span style="display:none;"> *****</ span> <span [...]
1. html display information structure, each message with <span> </ span>, refer to the following <div class="test"> <strong>»</strong><!– style="display:none;"style.css –> <span style="display:none;">text text text </span> <span style="display:none;">text text </span> <span style="display:none;">text </span> </div> 2. JQuery code, specifically to see comments jQuery(document).ready(function(){ test(); setInterval('test()', 6100); }); var test_i = 0, test_span_arr = 0; test_span_num = 0; [...]
Issue: Many blogs are using postname as the permanent link, it would be hard to check for the page ID, of course it's easy for WordPress savvy, who can edit links from backend. However many users feel it troublesome and would like to type in page title or alias directly. Analysis: For instance, catalog has [...]
Recent Comments