How to modify a large chart when a small chart is displayed on the Wordpress blog homepage

Source: Internet
Author: User
Tags wordpress blog

To test how to display a small graph on the Wordpress homepage, click the content page to display a large graph. Some people may like this method. If your blog is of the document type, in fact, this method is not needed, and there are a lot of options for image display, and you can use it with your pleasure. If you don't talk nonsense, it shows how to achieve this display method.

When posting an article, please write the thumbnail and the full graph, and use <-more-> after the thumbnail, so that the template on the homepage (index. in php), only the <-more-> area is displayed. Then in the Content Page (single. php) Hide the thumbnail with javascript (display: none;). In theory, this is the case, but I may not understand what the program is saying? Below I will describe the generation method of this article (in the HTML editing box ):

<Span id = "previewpage"> <a rel = "lightbox [groupname]" href = http://www.bkjia.com/uploadfile/2012/1115/20121115084419723.jpg "title =" nameless eyebrow thumbnail "> </a> text to be displayed on the home page </span> <! -More-> <script type = "text/javascript"> <! -$ ("Previewpage"). style. display = "none"; //-> </script>

The text already on the homepage should be written again here ..... Next is the content of other articles .... Note that only images are allowed to be displayed on the homepage. You only need to use the label to box it and give the label an id (previewpage here), just like:

<Span id = "previewpage"> content of the home page (including thumbnail) </span> is added with <-more->, followed by a javascript code, as shown below: <script type = "text/javascript"> <! -$ ("Previewpage"). style. display = "none"; //-> </script>

Note that the $ ("previewpage") previewpage is the id of the span you gave. The name must be the same, and your original pattern will be placed later, and the existing content on the homepage will be overwritten, you can.

Remember one thing at the end. write these things in the HTML code editing box, and the storage is complete, do not replace the HTML code editing box with the "View" and "Get edit box", because wordpress will automatically eat some codes that it deems useless or help you write a lot of codes, it is easy to fail. It is best to save it in the HTML editing box.

Content reprint: http://www.chinaxianghui.com text copyright, reprint Please retain 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.