Integrate and Display Google AdSense for Search and Co-Op Custom Search Engine Results in WordPress Blog Page Template Tích hợp và hiển thị Google AdSense cho Tìm kiếm và Co-Op cụ Tìm kiếm Tuỳ Kết quả trong WordPress Blog Trang Template

Google AdSense for Search features the ability to let web publishers to open and display search results within the website itself. Google AdSense cho các tính năng tìm kiếm khả năng để cho các nhà xuất bản web để mở ra và hiển thị kết quả tìm kiếm trong trang web riêng của mình. In other word, the results of a user search performed in Google AdSense for Search box will appear within a frame on a page from the site, so that rather the users need not to leave the publishers' websites and being taken to Google, while still able to search for information with Google web search. Mặt khác, kết quả của một người dùng thực hiện tìm kiếm trong Google AdSense cho hộp tìm kiếm sẽ xuất hiện trong một khung trên một trang từ trang web, do đó thay vì người dùng không cần phải rời khỏi trang web của nhà xuất bản và được đưa đến Google, trong khi vẫn còn có khả năng tìm kiếm thông tin với các tìm kiếm web của Google. Beside, Google AdSense for Search, Google Co-op also has Custom Search Engine that can be placed and integrated, together with the search results into website, and comes with more customization options such as search refinements, ads positioning, prioritize or limit sites to include in search results, change and modify the look and feel, collaboration with users, ability to create multiple search engine, make money with AdSense, and of course, ability to integrate into existing website and blog templates. Bên cạnh đó, Google AdSense cho Tìm kiếm, Google Co-op cũng đã cụ Tìm kiếm Tuỳ rằng có thể được đặt và tích hợp, cùng với các kết quả tìm kiếm vào trang web, và đi kèm với tuỳ chọn tuỳ chỉnh thêm như sàng lọc tìm kiếm, định vị quảng cáo, ưu tiên hoặc giới hạn các trang web để bao gồm trong các kết quả tìm kiếm, thay đổi và sửa đổi giao diện, hợp tác với người sử dụng, khả năng tạo nhiều công cụ tìm kiếm, kiếm tiền với AdSense, và tất nhiên, khả năng tích hợp vào trang web hiện có và blog mẫu.

To integrate, incorporate, embed and display Google search results from Google AdSense for Search and Google Co-Op Custom Search Engine within the template and theme of WordPress blog, we use the similar steps that used to Tích hợp, kết hợp, nhúng và hiển thị kết quả tìm kiếm của Google từ Google AdSense cho tìm kiếm và Google Co-Op Công cụ Tìm kiếm Tuỳ chỉnh bên trong mẫu và chủ đề của WordPress blog, chúng tôi sử dụng các bước tương tự được sử dụng để integrate and embed Amazon aStore into WordPress tích hợp và aStore Amazon nhúng vào WordPress blog by using additional Page template. blog bằng cách sử dụng thêm Trang mẫu. You can embed the search results code snippets on a new post if you want to display search results based on your WordPress theme's Post template. Bạn có thể nhúng các đoạn mã kết quả tìm kiếm ngày một bài mới nếu bạn muốn hiển thị kết quả tìm kiếm dựa trên WordPress của bạn chủ đề của bài mẫu. However, as Post doesn't allow you to select a unique custom template for a single post, you will have the same layout among all the post entries and search results. Tuy nhiên, như bài không cho phép bạn chọn một tùy chỉnh duy nhất mẫu cho một bài duy nhất, bạn sẽ có cách bố trí cùng một trong số tất cả các mục đăng bài và kết quả tìm kiếm. This is not advisable, as sidebar may take up a lot of space, and the theme's Post template has contains AdSense ads itself or other customisation that will make the embedded search results appear odd. Điều này là không nên, như bên có thể mất rất nhiều không gian, và các chủ đề của bài mẫu có chứa các quảng cáo AdSense của chính nó hoặc tuỳ chỉnh khác sẽ làm cho các kết quả tìm kiếm nhúng xuất hiện lẻ. So using a new Page template is better choice, and the Google search results can be made display on WordPress itself without any need of plugin. Vì vậy, bằng cách sử dụng một trang mẫu mới là sự lựa chọn tốt hơn, và kết quả tìm kiếm của Google có thể được hiển thị trên WordPress bản thân mà không cần bất kỳ plugin.

To embed, integrate and display Google search displays from Google AdSense for Search and Google Co-Op Custom Search Engine in WordPress blog, try the following steps. Để nhúng, tích hợp và màn hình hiển thị tìm kiếm của Google từ Google AdSense cho tìm kiếm và Google Co-Op cụ Tìm kiếm Tuỳ trong WordPress blog, hãy thử các bước sau đây.

  1. Sign up for Đăng ký Google AdSense Google AdSense or hoặc Google Co-Op Custom Search Engine Google Co-Op cụ Tìm kiếm Tuỳ . .
  2. When generate the Google AdSense search box code or Google Co-Op Custom Search Engine (CSE) search box code, remember to select “Open results within my own site” (Google AdSense for Search under Opening of search results page section) or “Host a search box and search results on your own site” (CSE under Add this search engine to your website section). Khi tạo mã hộp tìm kiếm Google AdSense hoặc Google Co-Op Custom Search Engine (CSE) Mã hộp tìm kiếm, hãy nhớ chọn "Mở kết quả trong trang web của chính tôi" (Google AdSense cho Tìm kiếm theo mở của phần kết quả tìm kiếm trang) hoặc chủ nhà " một hộp tìm kiếm và kết quả tìm kiếm trên trang web của riêng bạn "(CSE theo Thêm công cụ tìm kiếm đến phần trang web của bạn).

    Google AdSense cho Kết quả tìm kiếm trong trang web
    Google Co-Op CSE Kết quả tại trang web
    Key in the URL of the page on your site that the search results will appear. Chìa khóa trong URL của trang trên trang web của bạn rằng các kết quả tìm kiếm sẽ xuất hiện. For WordPress page without page parent, the URL should look like this: http://www.yourdomain.com/page-title/ (ie http://www.mydigitallife.info/google-search/). Cho WordPress trang mà không có cha mẹ trang, URL sẽ giống như thế này: http://www.yourdomain.com/page-title/ (tức là http://www.mydigitallife.info/google-search/). Note: trailing slash is insignificant, and can be dropped. Lưu ý: dấu gạch chéo là không đáng kể, và có thể được giảm xuống.

  3. You can do any other customization of your personal Google search engine, such as color, logo, style, layout, language, Google domain's country, sites to include, and etc. However, it's out of the scope of this article. Bạn có thể làm bất kỳ tuỳ biến khác của công cụ tìm kiếm Google cá nhân của bạn, chẳng hạn như màu sắc, biểu tượng, phong cách, bố trí, ngôn ngữ, tên miền Google của quốc gia, các trang web để bao gồm, và vv Tuy nhiên, nó nằm ngoài phạm vi của bài viết này.
  4. After customizing the search box, generate and get the search box code and search results code. Sau khi tùy chỉnh hộp tìm kiếm, tạo ra và lấy mã hộp tìm kiếm và tìm kiếm mã kết quả. (You must have both code, if not your configuration of search box is wrong.) (Bạn phải có cả hai mã, nếu không phải là cấu hình của bạn trong hộp tìm kiếm là sai.)
  5. Create a custom page template for Wordpress based on your existing Page template. Tạo một trang tuỳ chỉnh mẫu cho Wordpress dựa trên mẫu hiện tại của bạn Trang. You may retain or drop the sidebar (<?php get_sidebar(); ?> line), as sidebar may take up a lot of your webpage space. Bạn có thể giữ lại hoặc thả bên (<php get_sidebar? ();> Dòng?), Như bên có thể mất rất nhiều không gian trang web của bạn. If so you will need to adjust the width of search results accordingly during configuration and customisation of search box. Nếu vậy bạn sẽ cần phải điều chỉnh chiều rộng của kết quả tìm kiếm cho phù hợp trong quá trình cấu hình và tuỳ chỉnh của hộp tìm kiếm. Beside, as Wordpress templates are heavily aligned and positioned by using CSS DIV tags, you may need to remove DIV in CSS layout that restrict the width (if you remove the sidebar) or modify the structure of the layout in your Google search results page template. Bên cạnh đó, như Wordpress mẫu được rất nhiều liên kết và vị trí bằng cách sử dụng CSS DIV tags, bạn có thể cần phải loại bỏ DIV trong CSS bố trí hạn chế độ rộng (nếu bạn loại bỏ các bên) hoặc thay đổi cấu trúc của bố trí trong Google trang kết quả tìm kiếm của bạn mẫu . Generally, a Google Search search results page template without sidebar would like similarly like this (comments on template code in italic, can be safely ignored): Nói chung, một trang tìm kiếm Google Tìm kiếm kết quả mẫu mà không có bên xin ý kiến tương tự như thế này (trên mẫu mã trong nghiêng, có thể được bỏ qua một cách an toàn):
    <?php <? php
    /* / *
    Template Name: Search Results Page Tên mẫu: Kết quả tìm kiếm Trang
    */ * /
    ?> ?>
    The above section is important so that Wordpress will identify the new theme's php file as a Page template. Phần trên là quan trọng để Wordpress sẽ nhận dạng tập tin php chủ đề mới như là một trang mẫu. You can change the template name though. Bạn có thể thay đổi mẫu tên mặc dù.

    <?php get_header(); ?> <? php get_header ();?>
    In Wordpress theme's header, there may be also DIV tag that controls the width in the Page layout. Trong tiêu đề của Wordpress chủ đề, có thể có cũng DIV tag rằng kiểm soát chiều rộng trong cách bố trí Trang. If it's the case, the remove this line, the copy and paste the everything from Header template, and modify accordingly. Nếu đó là trường hợp, việc loại bỏ dòng này, sao chép và dán tất cả mọi thứ từ Header mẫu, và sửa đổi cho phù hợp.

    <div class=”content”> <div class="content">
    Again, this may restrict the width of layout, if so, replace it with your own DIV structure, or simply with <center></center> (which I used) or just remove the line. Một lần nữa, điều này có thể hạn chế độ rộng của bố trí, nếu như vậy, thay thế bằng cấu trúc DIV của riêng bạn, hoặc đơn giản chỉ với <center> </ center> (mà tôi đã sử dụng) hoặc chỉ cần loại bỏ các dòng.

    <!– Google Search Result Snippet Begins –> <! - Kết quả tìm kiếm của Google Snippet Begins ->
    <div id=”googleSearchUnitIframe”></div> <div id="googleSearchUnitIframe"> </ div>

    <script type=”text/javascript”> <script type="text/javascript">
    var googleSearchIframeName = 'googleSearchUnitIframe'; var googleSearchIframeName = 'googleSearchUnitIframe';
    var googleSearchFrameWidth = 700; var googleSearchFrameWidth = 700;
    var googleSearchFrameborder = 0 ; var googleSearchFrameborder = 0;
    var googleSearchDomain = 'www.google.com'; var googleSearchDomain = 'www.google.com';
    </script> </ script>
    <script type=”text/javascript” <script type = "text / javascript"
    src=”http://www.google.com/afsonline/show_afs_search.js”> src = "http://www.google.com/afsonline/show_afs_search.js">
    </script> </ script>
    <!– Google Search Result Snippet Ends –> <! - Kết quả tìm kiếm của Google Snippet Ends ->

    Replace above line with your own Google search results code (not Google search box code). Thay thế trên đường với mã số riêng của Google kết quả tìm kiếm của bạn (không mã hộp tìm kiếm của Google).

    </div> </ div>
    If you don't use any DIV above, just remove this line too. Nếu bạn không sử dụng bất kỳ DIV ở trên, chỉ cần loại bỏ dòng này quá. If you use <center>, replace with </center>. Nếu bạn sử dụng <center>, thay thế bằng </ center>.

    <?php get_footer(); ?> <? php get_footer ();?>

    Note: You can also exclude the theme's header and footer (basically mean empty template file just just a line of search results code, which will display only search results, but that defeat the purpose of integration with Wordpress. Lưu ý: Bạn cũng có thể loại trừ tiêu đề của chủ đề và chân trang (về cơ bản có nghĩa là trống rỗng, chỉ là bản mẫu tập tin chỉ là một dòng mã kết quả tìm kiếm, mà sẽ hiển thị kết quả tìm kiếm duy nhất, nhưng thất bại mục đích của hội nhập với Wordpress.

  6. Save the new page template for your WordPress theme. Lưu trang mẫu mới cho WordPress chủ đề của bạn. You can give it any name. Bạn có thể cho nó bất kỳ tên nào.
  7. Upload the new page template with search results code to your Wordpress theme's directory. Tải lên trang mới với mẫu mã kết quả tìm kiếm vào thư mục Wordpress chủ đề của bạn. So if you're using Blogsome or Wordpress.com, you may be out of luck. Vì vậy, nếu bạn đang sử dụng Blogsome hay Wordpress.com, bạn có thể ra khỏi may mắn.
  8. Create a new Wordpress static Page by clicking on “Write” then “Write Page”. Tạo một Wordpress mới tĩnh Trang bằng cách bấm vào "Viết" sau đó "Viết Trang".
    Key in Title as what you enter for URL to display search results during setup of Google search box above (eg if you enter /google-search/ as URL for search results page, you will need to enter Google Search as page title). Tiêu đề then chốt trong như những gì bạn nhập cho URL để hiển thị kết quả tìm kiếm trong quá trình cài đặt của hộp tìm kiếm của Google trên (ví dụ: nếu bạn nhập / google-search / URL cho trang kết quả tìm kiếm, bạn sẽ cần phải nhập vào Tìm kiếm Google như tiêu đề trang). You page-slug has to be exactly the same with the URL entered as shown in image below. Bạn slug trang-đã được chính xác cùng với các URL được nhập như trong hình dưới đây.
  9. On the Page Template at the side, choose Search Results Page (or whichever name you gave to the new template). Trên Tiêu Trang ở bên, chọn Kết quả tìm kiếm Trang (hoặc bất cứ tên mà bạn đã cung cấp cho mẫu mới).

    Đăng Tiêu bản và Đăng Slug

  10. Save and publish the page. Lưu và xuất bản trang.
  11. Edit your template, and put in the search box code to anywhere you like the search box to appear. Chỉnh sửa mẫu của bạn, và đặt trong mã hộp tìm kiếm vào bất cứ nơi nào bạn thích vào hộp tìm kiếm xuất hiện.
  12. The search results from Google is now integrated with WordPress blog. Các kết quả tìm kiếm từ Google bây giờ là tích hợp với WordPress blog. Whenever a user search with the Google search box from AdSense or Custom Search Engine, the search results will appear within your WordPress blog. Bất cứ khi nào tìm kiếm của người dùng với một hộp tìm kiếm của Google từ AdSense hoặc cụ Tìm kiếm Tuỳ, các kết quả tìm kiếm sẽ xuất hiện trong blog của bạn.

For sample of integration and inline search results display in WordPress blog by Google AdSense for search, simply use the search box on top. Đối với mẫu của hội nhập và hiển thị kết quả tìm kiếm nội tuyến trong WordPress blog của Google AdSense cho tìm kiếm, bạn chỉ cần sử dụng hộp tìm kiếm trên đầu trang. For Google Co-Op Custom Search Engine, check out Đối với Google Co-Op Tìm kiếm Tuỳ chỉnh, hãy kiểm tra Google Medical Search Engine Y tế Công cụ Tìm kiếm Google . .

IMPORTANT : The page is machine translated and provided "as is" without warranty. Quan trọng: Sửa là máy dịch và cung cấp "như là" không có bảo hành. Machine translation may be difficult to understand. Máy dịch thuật có thể khó hiểu. Please refer to Vui lòng tham khảo original English article bản gốc tiếng Anh bài viết whenever possible. bất cứ khi nào có thể.


10 Responses to “Integrate and Display Google AdSense for Search and Co-Op Custom Search Engine Results in WordPress Blog Page Template” 10 Responses to "Hội nhập và hiển thị Google AdSense cho Tìm kiếm và Co-Op cụ Tìm kiếm Tuỳ Kết quả trong WordPress Blog Trang Tiêu bản"

  1. Javier F. Javier F.
    January 26th, 2009 12:17 Ngày 26 tháng 1 2009 12:17
    10 10

    Very clear instructions. Hướng dẫn rất rõ ràng. I succesfully integraded google search to my blog. Tôi thành công integraded tìm kiếm google vào blog của tôi. Thanks, great work! Thanks, great work!

  2. JD (1to1million) JD (1to1million)
    November 9th, 2008 21:16 9 Tháng 11 2008 21:16
    9 9

    Real shame that the results page (SERP) is dumbed down and doesn't even display the number of pages.. Thật xấu hổ rằng các trang kết quả (SERP) là dumbed xuống và thậm chí không hiển thị số trang ..

    Give you » Results 1-10 Cung cấp cho bạn »Kết quả 1-10

    but misses the » …of about __,___ for nhưng lỡ các »... khoảng __,___ cho

  3. rafa Rafa
    October 2nd, 2008 17:28 Ngày 02 tháng 10 năm 2008 17:28
    8 8

    Hi, Chào,
    I succeded in integrating the search into my blog. Tôi succeded trong tích hợp tìm kiếm vào blog của tôi. The problem is that search results are to wide for being displaied correctly. Vấn đề là kết quả tìm kiếm được để rộng cho displaied đang được chính xác. since I need my sidebars for navigation (don't have page nav in header) i only have about 600 pix available for display width. kể từ khi tôi cần sidebars của tôi cho menu (không có nav trang trong phần đầu) tôi chỉ có khoảng 600 pix cho chiều rộng hiển thị. the minimum display width given by google is 795pix. chiều rộng hiển thị tối thiểu cho bởi google là 795pix. so it messes up my sidebar and search result display. do đó, nó messes lên bên tôi và hiển thị kết quả tìm kiếm.
    any help? bất kỳ trợ giúp?
    thanks cảm ơn

  4. Radio Radio
    August 14th, 2008 22:49 14 Tháng 8 năm 2008 22:49
    7 7

    Buen artículo aunque las imágenes un poco borrosas. Buen artículo aunque las Imágenes un poco borrosas. Llevo semanas intentando embedir Adsense en el blog de mi web sin éxito, a ver si siguiendo esta técnica… Llevo semanas intentando embedir Adsense en el blog de mi web Exito tội lỗi, một ver si esta siguiendo Tecnica ...

  5. Probando el nuevo Búsqueda Personalizada de Google - Primate Blog Probando el nuevo Búsqueda Personalizada de Google - Linh trưởng Blog
    June 15th, 2008 19:02 15 tháng 6 năm 2008 19:02
    6 6

    [...] cierto, y más allá del nuevo producto Google, recomiendo este pequeño paso a paso que me vino muy bien para poder integrar los resultados en el template de [...] [...] Cierto, y más alla del nuevo producto Google, recomiendo este Pequeño paso a paso que me vino muy bien para poder integrar los resultados en el mẫu de [...]

  6. Wordpress Plugin Centre - Clean Wordpress Template - Integrate and Display Google AdSense for Search and Co-Op Custom Wordpress Plugin Trung tâm - sạch Wordpress Template - Tích hợp và hiển thị Google AdSense cho Tìm kiếm và Co-Op Custom
    June 12th, 2008 15:41 Tháng Sáu 12, 2008 15:41
    5 5

    [...] Integrate and Display Google AdSense for Search and Co-Op Custom To integrate, incorporate, embed and display Google search results from Google AdSense for Search and Google Co-Op Custom Search Engine within the template and theme of WordPress [...] [...] Tích hợp và hiển thị Google AdSense cho Tìm kiếm và Co-Op Tuỳ Để tích hợp, kết hợp, nhúng và hiển thị kết quả tìm kiếm của Google từ Google AdSense cho tìm kiếm và Google Co-Op Công cụ Tìm kiếm Tuỳ chỉnh bên trong mẫu và chủ đề của WordPress [. ..]

  7. ragin'Geek ragin'Geek
    May 10th, 2008 14:55 Tháng 5 10, 2008 14:55
    4 4

    Is there a way to keep a published page from showing up? Có cách nào để giữ cho một trang được xuất bản từ hiển thị? My template uses wp_list_pages to display the top level pages in a menu, can i suppress my search results page? Wp_list_pages mẫu của tôi sử dụng để hiển thị các trang cấp các trang trong một trình đơn, tôi có thể ngăn chặn những trang kết quả tìm kiếm của tôi?

  8. get it from Boy! lấy nó từ Boy!
    February 3rd, 2008 11:58 03 Tháng Hai 2008 11:58
    3 3

    i really like your ad layouts and of course on how to implement it in wordpress.org sites.. i thực sự như bố trí quảng cáo của bạn và của các khóa học về cách thực hiện nó trong wordpress.org các trang web ..

    i hope you make them into wodpress plugins instead so that it will be easier. tôi hy vọng bạn làm cho họ thành phần bổ wodpress thay vì để nó sẽ được dễ dàng hơn. I'm pretty sure your site will be more popular. Tôi khá chắc chắn rằng trang web của bạn sẽ được phổ biến hơn.

    thanks cảm ơn

  9. jameswillisisthebest jameswillisisthebest
    September 9th, 2007 04:37 09 tháng 9 năm 2007 04:37
    2 2

    This is my first post Đây là bài đầu tiên của tôi
    just saying HI chỉ cần nói HI

  10. NetBloke NetBloke
    August 20th, 2007 05:26 20 tháng 8 năm 2007 05:26
    1 1

    I am trying to follow these instructions and am not having any luck with getting the results to appear on the search page. Tôi cố gắng để làm theo các chỉ dẫn và không có bất kỳ may mắn với nhận được kết quả xuất hiện trên các trang tìm kiếm.

    I think I am not doing the static page bit right. Tôi nghĩ rằng tôi không thực hiện quyền trang chút tĩnh. How do I make it a static page exactly? Làm thế nào để làm cho nó một trang tĩnh một cách chính xác?

Leave a Reply Để lại một trả lời

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Bạn có thể sử dụng các thẻ: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q <strike> <strong>

Subscribe to comments feature has been disabled. Thuê bao với ý kiến đều đã bị vô hiệu hoá. To receive notification of latest comments posted, subscribe to Để nhận được thông báo mới nhất đăng ý kiến, đăng ký với My Digital Life Comments RSS feed My Digital Life kiến RSS feed or hoặc register to receive đăng ký để nhận được new comments in daily email digest. Các ý kiến mới trong email tiêu hàng ngày.
Custom Search

New Articles Bài viết mới

Incoming Search Terms for the Article Tìm đến các Điều khoản Điều

google google - -- modify adsense search width sửa đổi chiều rộng tìm kiếm adsense - -- integrate google adsense tích hợp google adsense - -- how to modify google custom search width làm thế nào để thay đổi chiều rộng google tìm kiếm tuỳ chỉnh - -- integrate google adsense in custom application google adsense tích hợp trong tùy chỉnh ứng dụng - -- googleSearch Unit Iframe width change Đơn vị googleSearch iframe thay đổi chiều rộng - --