Share some tips for building WordPress blog

Source: Internet
Author: User
Keywords WordPress

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Hefei SEO also played before dedecms, no contact with WordPress, so call this station also spent nearly a week of time. Before using DEDECMS to call this station well, but there are many functions to achieve a lot of trouble, such as monthly archive, random articles, such as blog features, need to carry out two development, but under the transfer to WordPress.

Before contacting, also heard z-blog,wordpress and so on set up the blog program, but has not been to practice. Spent nearly one hours to see the video tutorial, WordPress has a general understanding, and then put into practice. After all, the novice on the road, sometimes even a function has a corresponding plug-in do not know, only slowly groping. In this process is always learned a lot of knowledge, the big side believe everyone to go online search can see, Hefei seo in this share a few encounter tips.

1. Construction Template page. Unlike Dedecms, WordPress creates a new template page to add code.

< PHP

/*

Template Name: template names

*/

? >

2. Page jump. How to achieve the page jump? Create a template and then add the code.

< PHP

/*

Template Name:redirect

*/

if (Have_posts ())

{

The_post ();

$pattern = ' @ (https?:/ /([-\w\.] +) + (: \d+)? (/([\w/_\.] * (\?\s+)?) @’;

Preg_match ($pattern, Get_the_excerpt (), $matches);

if ($matches [0]) header (' Location: '. $matches [0]);

else Echo ' Enter a URL into your page ';

}

? >

After you save the template to the theme directory, you can insert the destination address you want to jump in the HTML state of the page. As

  

Implement page Jump

3. Remove index.php. Hefei SEO at that time in the local construction of a good WordPress program, uploaded to the server when the visit, always go index.php, that depressed. Finally understand, the solution to share. If the server is using Windows2003+iis, we always have index.php when we fix the permanent link.

(1) Create a PHP document, set the encoding to UTF-8, write the following code and save 404.php upload to the site root directory.

< PHP

Header ("http/1.1 OK");

$ori _qs = $_server[' query_string '];

$pattern = '/[^;] +; [^:]+://[^/]+(/[^?] *)(?:? (.*))? /I ';

Preg_match ($pattern, $ori _qs, $matches);

$_server[' path_info ' = $matches [1]. ‘?’ . $matches [2];

$_server[' Request_uri '] = $_server[' path_info '];

$query _args = Explode (' & ', $matches [2]);

Unset ($_get);

foreach ($query _args as $arg)

{

$the _arg = explode (' = ', $arg);

$_get[$the _arg[0]] = $the _arg[1];

}

Include (' index.php ');

? >

(2) Go to the server and find the setting 404 custom error pointing to 404.php. The premise is that your server has this feature oh. If not, there are other publications on the Internet such as the use of Cos-html-cache plug-ins, I have not tried, not very clear oh.

  

Custom 404 Modify Removal index.php

(3) into the WordPress management background, set up a permanent link, install your desired formatting on the line, the same as the local.

4, the strong WordPress, must be inseparable from the powerful plug-ins, from the point of view of SEO, Hefei seo in this for you to introduce a few. Oh, here just let the novice know that there is this plug-in, do not like the Hefei SEO before, a little to grope, the specific use of methods you can go to their own search, you will.

Reference Platinum SEO Pack: Mainly for Search engine Optimization page and article title, automatically generate SEO-related meta tags.

Article WP No Category Base: By default, wordpress classification of Fixed link format for http://www.***.org/category/blog/, Use this plugin does not need to modify the WordPress core program also does not destroy other unrelated links, can automatically classify the link in the "Category" field removed, into http://www.***.org/blog/.

(3) Aidu Sitemap generator/google XML Sitemaps: These two are good site map generation Plug-ins that can generate. html and. XML formats.

(4) WP Kit CN: I previously used the Chinese WordPress toolbox, but not too ideal, and later used an improved version of this WP kit CN. Random article recommendations can make your site change, let spiders feel you are changing oh.

(5) WP Slug translate: After adding an article, when you fixed the link for the article name, add Chinese name URL will appear garbled, use this plugin can translate it into English. But I thought about unloading it, and when I fixed the link, I turned it into a/%post_id%.html.

This is a few of the SEO site in Hefei and SEO optimization has a closely related plug-ins.

5, another recommendation of the plug-in, because and SEO optimization has nothing to do with or even violate SEO optimization plug-ins, but feel very cool, in this mention. WP Cumulus: This plug-in can achieve the 3D effect of the cloud tag, but the Chinese support effect is poor.

  

Cloud label for 3D effect

This is the case today, the above is Hefei SEO as a novice in the process of building a site to accumulate a little application knowledge, to record. Like this theme friends can visit Hefei SEO open a blog, the construction process problems can also communicate with the forward. In addition, the next opportunity to share under the dedecms construction of this theme style encountered and resolved knowledge points. A small step every day will make a big step. This article Department of Hefei SEO Webmaster Original, reproduced please indicate the source: www.anhuiseo.org Thank you!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.