Calling a single page with wordpress is generally used to put advertisements on blogs. There are two ways to operate, one is to use iframe, and the other is to use js code. Let's talk about the actual operation steps first.
Iframe call single page
1. Since it is called a single page, it needs a single page, so the first step is to prepare a single page. You can also do it yourself in DW(dreamweaver), so I won't go into details here. In addition, you can also find the target page to download. For example, you can see which website has a better single page, then look at the source code to find the address of its single page, and then save it as a download page with the browser's target and name it arbitrarily. In view of the fact that some novices don't quite understand it, I specially found a single page of Baidu as a demonstration tutorial, as shown below:
2. According to the above operation, we will get a single page named baidu.htm, plus a baidu_files folder for storing single-page pictures and other files. Next, we use FTP tool to upload these two files to wordpress theme directory, and the path is /wp-content/themes/, so that you can visit this website /wp-content/themes/baidu.htm and you can see this single page.
If the website has only one page, you need to know how to call it. Calling the method is actually very simple. You just need to put a piece of code under the wordpress theme title to call it. The code is as follows:
Ok, now visit your website, and the effect of one page will come out. Of course, you don't have to put a page on your head. You can try more where to put it.
Js call single page
Js calling a single page is actually similar to iframe calling, with one more step. The method is to do the above steps 1 and 2.
1. Next, create a js file on the desktop (create a notepad and change the suffix name to. js。 Maybe it doesn't matter if some friends change the suffix, because your computer hides the extension of the file, just set it), and the js file name is random, so let's name it. baidu.js? .
2. Open this baidu.js with Notepad and insert the code into it, as shown below:
Code:
document.write(? & lt inline frame
src=? & lt span
style=? Color:
# ff0000? & gt/WP-content/themes/Baidu . htm & lt; /span>。 ?
Width =? 100%? & lt span
style=? Color:
# ff0000? & gt height =? 4 15? & lt/span>。
frameborder=? No?
border=? 0?
marginwidth=? 0?
marginheight=? 0? Scroll =? No? & gt& lt/iframe & gt; ? );
3. After the code is inserted, we will save this baidu.js file, then upload it to the /wp-content/themes/ directory of the website and access it with /wp-content/themes/baidu.js to see if we can access it.
4. The last step is to call this js in the webpage. The calling code is as follows:
& lt script
src=? /wp-content/themes/baidu.js?
Language =? javascript? & gt
Seeing this, I believe that everyone can understand without parsing. We just need to put this code under the wordpress theme title and visit the home page to see the effect.
Written in the back: Of these two calling methods, I prefer js calling, because Baidu can't index the content of js code, and iframe calling Baidu can already be included. As can be seen from Baidu's snapshot, because most webmasters who use single-page calling are Taoke, Baidu is a little disgusted with Taoke, so I personally suggest using js calling.