WordPress Blog Home Display small map content display large image modification method

Source: Internet
Author: User

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

Test how to let the homepage of WordPress Show is small picture, after the point of the content page directly shows the big diagram, some people seem to like this way, if your blog is the type of article, in fact, do not need this method, and the display of pictures can have a lot of choices and with your happy alternate use, Not much to say nonsense, to show how to do this display way.

In the post, please write the thumbnail and the whole picture, in the back of the thumbnail use <–more–>, so that in the first page of the template (index.php), will only be shown to the <–more–> of this place. Then in the Content page place (single.php) uses the JavaScript to hide the thumbnail (display:none;) That's theoretically true, but I don't know what I'm talking about. Below I describe how this article is generated as follows (in the HTML edit box):

&lt;span id= "Previewpage" &gt; &lt;a rel= "lightbox[groupname" "href=" http://your site URL picture path/2293/1867653389_ 9c0555d380_o.jpg "title=" "Unknown Meimei small figure" &gt;&lt;img width= "160″src=" http://your website url picture path/2293/1867653389_1ed4aa8a44_m.jpg " alt= "Meimei" height= "240″/&gt;&lt;/a&gt;" the text to display &lt;/span &gt;&lt;!–more–&gt; &lt;script type= "Text/javascript" &gt; &lt;!–$ ("Previewpage"). style.display= "None"; –&gt;&lt;/script&gt; &lt;img src= "http://your website url picture path/2293/1867653389_9c0555d380_o.jpg" alt= "Unknown Meimei big picture"/&gt;

Home already have the text to be written here again ... next is the content of other articles .... Please note that the page can be displayed more than just a picture, you just use the label to frame it, and give the label an ID (here is previewpage), like this:

&lt;span id= "Previewpage" &gt; The contents of the home page (including thumbnails) &lt;/span&gt; then add &lt;–more–&gt;, followed by a JavaScript code, as follows: &lt;script type = "Text/javascript" &gt; &lt;!–$ ("Previewpage"). style.display= "None"; –&gt;&lt;/script&gt;

Note that the previewpage of $ ("Previewpage") is the ID you give span, the name to be the same, and then put your original pattern, and the content of the first page has been rewritten, it can be.

Finally remember one thing, finally please write these things in the HTML code edit box, after the storage is finished, do not in the HTML code edit box and see and the resulting edit box for change, because WordPress will automatically put some of your IT think useless code to eat or more to help you write a lot of code, easy to fail, The best thing to do is to save it in the HTML edit box.

Content reprint: http://www.chinaxianghui.com text copyright, reprint please keep the source link.

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.