WordPress calls a single page operation tutorial

Source: Internet
Author: User

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

WordPress program is currently the most popular blog program, in the domestic use of the volume is very large. Recently saw a lot of novice in the use of WordPress, do not know how to call a single page, and I did not find this in the online very detailed tutorials, so this special to write down the call of a single page of the operation method, although it is very basic, but is really a lot of novice needs. Using the WordPress call single page is usually put on the blog ads used, the operation of two methods, one is the use of IFRAME calls, one is the use of JS code calls, below the actual operation steps.

IFrame Call single page

1. Since it is called a single page, it needs to have a single page, so the first step is to prepare a single page, a single page can be produced by its own DW (Dreamweaver), here will not be described in detail. Also can find the target page to download, such as you see which site of the single page is good, and then look at the source code, find its single page address, and then use the browser's goal to save the Web page, named as a random name on OK. In view of some beginners may still not understand, so I deliberately found a single page to do a demonstration tutorial, look at the following figure:

  

  

2. In accordance with the operation of the above figure we will get a single page named 123.htm, add a single page of pictures and other files 123_files folder, next we put these two files uploaded to the wordpress theme directory with FTP tools, the path is/wp-content/ themes/, so you use your own web site http://www.yoursite.com/wp-content/themes/123.htm to visit, you can see this single page, and the other "yoursite.com" is your domain name.

3. The site has a single page, that also need to know how to call, call the method is actually very simple, just want to put a piece of code under the WordPress theme header can be called, the code is as follows:

< iframe frameborder= "0" marginheight= "0" marginwidth= "0" border= "0" scrolling= "no" height= "2968px" width= "100%" src = "http://www.yoursite.com/wp-content/themes/123.htm" ></iframe >

The red section above represents the height of a single page, the height of which you can adjust yourself in the display, and the other represents your single page address.

OK, now visit your site, the single page effect will come out. Of course, a single page does not have to be placed in the head, specifically put in where you can try more.

JS Call single page

JS call a single page in fact, with the same as the IFRAME call, one more step, the way is to do the above 1, 2 steps.

1. Next on the desktop to create a JS file (set up a notepad, the suffix name changed to. js on OK.) Some friends may change the suffix name has no effect, this is because your computer hidden file extension, as long as the set up on the good, JS file name is arbitrary take, let's name it "123.js".

  

2. Use Notepad to open this 123.js, insert the code inside, the code is as follows:

document.write (' < iframe src= "http://www.yoursite.com/wp-content/themes/123.htm" width=\ "100%" height= "415" Frameborder= "No" border= "0" marginwidth= "0" marginheight= "0" scrolling= "no" ></iframe > ");

Hint: The Red page address represents your single page address, as well as the adjustment to represent a single page height.

3. After inserting the code, we save the 123.js file, then upload it to the/wp-content/themes/directory of the website, and use the Http://www.yoursite.com/wp-content/themes/123.js access, See if you can access.

4. The final step is to call this section JS in the Web page, the calling code is as follows:

< script src= ' http://www.yoursite.com/wp-content/themes/123.js ' language= ' JavaScript ' > </script >

See here, I believe that we can understand without parsing, we just put this piece of code into the WordPress theme under the head OK, access to next page can see the effect.

Write at the back: both of these calling methods, personal comparison is inclined to JS call, because now Baidu can not index JS code inside the content, and the IFRAME call Baidu can be included, from the Baidu snapshot can be seen, because the use of a single page of the majority of the webmaster is to do Amoy, and Baidu a bit disgusted Amoy, So personal advice or use JS call. The author of this article Http://www.13xd.com/ipad protective sleeve. Writing this tutorial also cost a lot of heart, please note the source of the reprint.

Related Article

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.