A refreshing green theme Cordobo Green Park 2

Fresh green theme Cordobo Green Park 2

 

cordobo2 清爽的清爽的绿色主题Cordobo Green Park 2Fresh green theme Cordobo Green Park 2

Language: English
Version: 0.8.610
Category: Three columns
Demonstration: DEMO

Theme Features:
  • A refreshing green theme
  • Fully compatible with WordPress 2.7.1 and 2.8
  • Support for WordPress gadgets
  • This version of the CSS was optimized to load quickly, the SQL database query to a minimum
  • Support Twitter plug-in

7 Color: Chinese Original WordPress Template

Themes:

A Chinese original cool, simple style WordPress template.
Designer color skill absolutely first-class, he put the rainbow color of the page head, white text area and the bottom of the blue, the perfect combination of up, this is definitely a rare high-level work this year.

About the Author:

Product director, former West Temple Hutong operations director. Since 1997, more than 10 years experience in the Internet industry. In the long-term, cross-domain Internet work, I feel the deepest, most want to share is: design simplifies the network, network simplifies life.

 

7color theme 300x220 7color:国人原创WordPress模板

WordPress Site Performance Optimization to reduce the load time to improve the user experience

Recently to listen to the D2 Forum, a more profound understanding of the site for the user experience the importance of performance.

Slow 500ms = 20% lower Google User Visits

Slow 400ms = Yahoo! User traffic decreased by 5-9%

Slow 100ms = Amazon sales are down 1%

After the meeting, can not help but want to see how their site performance. Since the site moved to foreign countries, really a bit worried. You can not help but be amazed by the performance of your site with Google Webmaster Tools: Your site’s average page load time is 20.2 seconds. The site is slower than 99.7% of the sites.

It seems to optimize the hands of the. First in their own Firefox browser installed in the site performance testing tools Google Page Speed and Yslow. First, use YSlow to check the size of the home page. A total of 257.3KB.

And then Google Page Speed to see what can be improved. From the problems found, there are still many places can be optimized.

Due to the limited technical capacity and time, only a simple optimization can be carried out. I did some of the following optimizations:

First, compression style pictures

I did not use any advanced compression tools, but with Fireworks CS4 batch processing of the picture (no change in file type), the original site theme of all the style pictures have 195KB, optimized to reduce the 54.94KB. And optimize the picture, the naked eye can not see the difference (at least I did not see it).

Second, start gzip compression

Because I use the virtual host, and did not configure the server to open gzip permissions. I can only rely on WordPress plug-in GZIP Output. Home page size (Html / Text) decreased by 18.9KB.

However, GZIP Output can only be compressed for the php file, for the bulk of the CSS, JS files can not be processed. I also downloaded and installed the WP CSS and WP JS plug-ins to compress the CSS and JS files separately. However, WP JS this plug-in I did not get to know how to use, WP CSS is applied successfully. Web site theme style file from the original 23.5KB into 8.1KB, on the home page is also reduced by 15.4KB.

Third, reduce the unnecessary page elements

Js from the page load point of view, I have two Js is used to do site visits statistics. One is google analytics, the other is piwik. Trade-offs I removed the piwik statistics code, the home page size is reduced by 8.3KB.

In addition, the website footer has a picture of no effect. I simply to get rid of the home page size has reduced 5.66KB ,. Doing so not only reduces the page size, but also reduces unnecessary Http requests.

In conclusion

Really do not optimize optimization, a surprise. After optimizing the size of the first page from the original 257.3KB into 154.0KB, the total optimization value of 103.3KB, than the original page optimization of 40.15%. Home Http request from the original 25 into 22. Specific optimization details are as follows:

After some optimization, in the end will have what effect the page loading time. Let us try using the Web Page Analyzer, it can simulate the user in different network access page load time. Compare before and after optimization of the situation, the effect is quite good. Users of the mainstream bandwidth load time, optimized from 20.37 seconds to less than 3 seconds.

The above optimization work is not only on the home page optimization effect. Because the entire site uses a theme style, other pages have also been optimized. As for the overall performance of the site, we also use the article at the beginning of the Google Webmaster Tools to test. In January and then through it to view site performance, and finally, have been satisfied with the results. “Average page load time of your site is 2.6 seconds (Updated: 2010-1-9). The website is faster than 57% of the site.”

Article Source: http: //www.2beusable.com/website-optimization-practice.html

Five practical WordPress database skills

WordPress blog is provided by the support of the blog, the writing process in the blog, and sometimes had to involve some of the MySQL database operation, although, plug-ins and code of the plug-in, Changes can also help us solve the problem, but this is a temporary solution of the rich, free, reasonable use of phpMyAdmin to carry out the operation of the data is necessary.

What can phpMyAdmin do to help us do this? This article is to introduce you to WordPress more useful several operations:

1. The backup database

Database backup for our webmaster is very necessary, this network storm involves a lot of webmasters, if the site backup, then it can be restored in a short time, not to be, your site will OVER, of course, you can also use the WP-DB-Backup plug-in database backup is very convenient, WordPress users can install the plug-in and regularly back up the data.

2. Quickly delete spam comments

WordPress interactive strong is one of its advantages, this advantage can be a lot of spam ads have been used, however, by a simple delete statement, you can solve this problem, the implementation of this command:

DELETE from wp_comments WHERE comment_approved = ’0′;

Then, all the spam ads can be deleted.

3. Manually reset the password

WordPress in order to increase security, will automatically generate the secret is not easy to crack, but sometimes the blogger will also appear to forget the password thing happens, this is, we can phpmyadmin to re-modify the password, use the following command :

UPDATE `wp_users` SET `user_pass` = MD5(‘PASSWORD’) WHERE `wp_users`.`user_login` =`admin` LIMIT 1;

So the password to modify the success of the.

4. The replacement domain

Re-change the domain name, then the need to retain the blog and data while changing the blog’s domain name. Since WordPress stores the domain name in the database, in order to connect the new domain name to the blog, you must change the database and use the following command to modify it:

UPDATE wp_options SET option_value = replace(option_value, ‘http://www.oldsite.com’, ‘http://www.newsite.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

Replace the relative URLs (guid globally unique identifiers) for all logs with the following statement:

UPDATE wp_posts SET guid = replace(guid, ‘http://www.oldsite.com’,’http://www.newsite.com’);

Search the wp_posts table and replace the URL in it to make sure no old URLs exist:

UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.oldsite.com’, ‘http://www.newsite.com’);

This completes the domain name changes, you have a complete use of your blog

5. Modify the WordPress database

WordPress version upgrade faster, so, upgrade the blog is not, if the modification or upgrade process or other causes of blog data loss or damage, I hope you have a backup database, so that you can import the backup database to Database to compensate for losses.

In addition to the five methods described above, we can also use it to “change the log properties” and other operations, in general, phpmyadmin function is still very strong, it can help us better use Mysql database.

If you are interested in WordPress development, you can look at the Chinese translation of the wordpress document http://www.wordpress.la/codex.html, wordpress development of the relevant knowledge, interested in WordPress development bloggers will have a certain Of usefulness.

Original article, reproduced please specify: www.wordpress.la

 

How to change a WordPress comment avatar

In someone else’s WordPress blog comments after the show you want to avatar through a plug-in (Gravatar) to achieve, but the good thing is that WordPress2.5 has directly support Gravatar, like wp2.7 comes with nested functions , It is convenient. If you want to experience, then you can go to http://www.gravatar.com/ registered a user, although the English site, but I believe that the Internet users often difficult to fall.
gravatar 如何更改WordPress评论头像

PS: 24-72 hours in general can be audited. If the image does not contain violence or exposure to content, most will be G-level rating. After this picture can be used by the. In any place that supports Gravatar, when filling out the email address, please fill in the email address that you use to register your avatar. Your avatar will appear in the message.

Lecture 4: Make footer.php of your Blog

Last time, we talked about how to make the header part of WordPress theme, so far, our theme directory should have style.css, header.php, index.php these basic documents, today we talk about footer.php production .

Footer.php is responsible for the bottom part of the page, this part generally contains the contents of the main copyright information, statistical code, the record information (at home) and so on. Now we are in the wpc-tomheng directory in the establishment of a footer.php file. inside

Write the following code:

<div id=”footer”>
<div ><a href=”<?php bloginfo(‘url’); ?>”><?php bloginfo(‘name’);?>Powered by </a><a
href=””>WordPress</a></div>
<div >
<div class=”tongji”>在这里可以加入你的统计代码</div>
<div class=”beian”>这里是您的备案信息</div>
<div ><?php echo get_num_queries();?>querys in <?php echo timer_stop() ;?>seconds</div>
</div>
<?php wp_footer(); ?>
</body>
</html>

Now open the browser should be able to see the relevant information. It is very simple, it is easy, it is fun.

Bloginfo () function Needless to say, if you do not understand it, then please see our last talk.

(1)The get_num_queries () function

The function (without any parameters) is the role of WordPress from initialization to the function call so far, a total of how many times sql query.

(2)The timer_stop () function

This is to obtain the current running time, you can generally measure the time of the WordPress query. This function is defined in: /wordpress/wp-settings.php -> line 162 Interested friends can look at.

(3) The WP_footer () function

WP_footer () is a hook function of WordPress, used in plug-in development in the function. Coupled with this function is its own theme support plug-in development, at the same time and more in line with norms.

Today, these functions are relatively simple There is no complex parameter options, relatively simple, these functions as long as they know their role, specifically used where to look at their own design friends.

 

Lecture 6 sidebar.php Production Process

On the one we learned the production of index.php, this is more important, if you do not understand the place, back

The first to take a closer look at the contents of our tutorial, we must put the code in index.php understand clearly. Today we take a look
Sidebar.php production.

First of all, we need to add get_sidebar () function in index.php to introduce this file. Open the index.php file, Get_footer () function in front of the get_sidebar () function can be friends.

Next in the sidebar.php write the following code:

<Div id = “sidebar”>
<Ul>
<Li>
<? Php get_search_form ();?>
</ Li>
</ Ul>
<Ul role = “navigation”>
<? Php wp_list_pages ( ‘title_li = <h2>’. ‘Pages’. ‘</ H2>’);?>
<Li> <h2> Archives </ h2>
<Ul>
<? Php wp_get_archives ( ‘type = monthly’);?>
</ Ul>
</ Li>
<? Php wp_list_categories ( ‘show_count = 1 & title_li = <h2>’. ‘Categories’. ‘</ H2>’);?>
</ Ul>
<Ul>
<? Php if (is_home () || is_page ()) {?>
<Li> <h2> Meta </ h2>
<Ul>
<? Php wp_register ();?>
<Li> <? Php wp_loginout ();?> </ Li>

</ Ul>
</ Li>
<? Php}?>
</ Ul>
</ Div>

Now you can open the browser to see what the code is done. Here we look at the role of the function inside

What is it and how to use it.

(1) get_search_form () function

The function of this function is the real search box. After this function call can be displayed directly with a complete function of the search
Box, we do not have to write any additional code. This is the charm of WordPress, he gave us some very useful letters
Loaded function, thus reducing the burden on our development, you can focus on the theme of the design.

(2) wp_list_pages (), wp_list_categories () function

Wp_list_pages ()

This function displays all the pages within the WordPress blog as hyperlinks to the page name, and is often used to create top navigation
Page, or to modify the sidebar.

(Such as wp_list_pages ( ‘title_li = & sort_column = menu_order & include = 12,25,38,57 & depth = 1 &’)

The meaning of each parameter is as follows:

Title_li = used to set up a display of all the pages of a general name; behind no parameter value, that does not show the name;

Sort_column = menu_order used to set the display order of the page, according to WP background set the page order

Display, other commonly used sequence settings may also include post_title, post_date, ID and so on;

Include = 12,25,38,57 that only show the ID value of these four pages; we can also use the exclude to

Exclude pages with corresponding IDs;

Depth = 1 that only shows the parent page, all sub-pages are not displayed; other values also include the default 0, that display

All pages (sub-pages are indented); – 1 shows all pages (no indentation of sub-pages);

In addition, the function may also use the attributes include link_before and link_after, used to set the display page link

Before and after the characters.

Wp_list_categories ()

Wp_list_categories () function is used to obtain the classification of blog posts information, and can be set by the appropriate function parameters,
Will be displayed. The function of the parameters and wp_get_archives () function similar to the need to use the & link, on a single lead

The number ( ‘) is passed as a string. Shaped as wp_get_archives ( ‘orderby = name & order = ASC &
Show_count = 1 & use_desc_for_title = 1 & feed = Subscribe & exclude = 2,5 & number = 10 ‘)

The meaning of each parameter is as follows:

Orderby = name that the classification in accordance with the name of the alphabetical order display classification information, you can name for ID and so on;

Order = ASC indicates that the classification information in ascending order according to the name of the classification, ASC will be changed to DESC

sequence;

Show_count = 1 Shows the number of articles belonging to the category after each category name;

Use_desc_for_title = 1 Use the description information for this category to add a title attribute for each category name hyperlink;

Feed = Subscriptions: Add a hyperlink called “Subscriptions” next to each category to provide an RSS feed for that category;

Exclude = 2,5 in the classification shown in the removal of ID 2 and 5 categories; can also include = 2,5 said that the show only ID
2 and 5;

Number = 10 indicates that only the first 10 categories are displayed.
(3) is_home (), is_page () function

Is_home () is used to determine whether the currently displayed blog page is the first page, returns a Bool value. If it is in the first
Page, returns TRUE; otherwise, returns FALSE.

This function is used to control the display of the blog sidebar, often using the following snippet:

<? Php
If (is_home ()) {
// This is the content that should be displayed on the blog home page
} Else {
// This is the content that should be displayed on the non-blog homepage
}}
?>

Is_page () function to determine whether the current display of the contents of the blog is a separate page (page), is the establishment of the page in the background

It also returns a Bool value. We can in the template through the function to determine whether the current is a separate page,
So as to decide whether to display the published article for the current time and so on.

Similar functions are:

Is_paged () is_single () is_tag () is_category () is_archive

(4) wp_register (), wp_loginout () function

Wp_register () gets the link to the login background, wp_loginout () gets the link to log out.

Up to now, a basic wordpress theme has taken shape. This set of theme tutorials also come to an end, hope big

Home will be harvested from.