Integrate and Display Google AdSense for Search and Co-Op Custom Search Engine Results in WordPress Blog Page Template整合和展示Google AdSense for search的和合作的作品自定义搜索引擎结果在WordPress博客页面模板

Google AdSense for Search features the ability to let web publishers to open and display search results within the website itself. Google AdSense for search的功能的能力,让网站发布开放和显示搜索结果的网站本身。 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.在其他词,结果用户的搜索表现在Google AdSense for search框会出现一个框架在一个网页上,从网站,使用户,而不必离开出版商的网站和正在采取的Google ,而仍能够搜索信息与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.旁边, Google AdSense for search的, Google Co - op的也有自定义搜索引擎可以放在和集成,联同搜索结果的网站,并附带更多的定制选项,如搜索优化,广告定位,优先考虑或限制用地包括在搜索结果中,变更和修改的外观和感觉,协作与用户的能力,创建多个搜索引擎,赚钱与AdSense ,当然,有能力集成到现有的网站和博客模板。

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整合,纳入,嵌入并显示Google搜寻结果从Google的AdSense for search与Google合作的作品自定义搜索引擎内部的模板和主题, WordPress的博客,我们会使用类似的步骤,用来 integrate and embed Amazon aStore into WordPress整合和嵌入亚马逊astore到的WordPress blog by using additional Page template.博客使用额外的页模板。 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.您可以嵌入搜索结果的代码段上的新职位,如果您想要显示搜索结果根据您的WordPress主题的帖子模板。 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.不过,由于邮政不允许您选择一个独特的自定义模板为一个单一的工作地点,你都会有相同的布局,各邮政参赛作品和搜索结果。 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.这是不可取的,作为工具栏可能会采取了很多空间,以及主题的帖子模板已包含AdSense广告本身或其他定制这将使嵌入式搜索结果显示多元。 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.因此,使用了新的一页模板是更好的选择,以及Google的搜寻结果可以作出上显示的WordPress本身没有任何有需要的插件。

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.嵌入,集成和显示Google搜寻显示从Google的AdSense for search与Google合作的作品自定义搜索引擎在WordPress博客,尝试以下步骤。

  1. Sign up for注册了 Google AdSense Google AdSense的 or Google Co-Op Custom Search Engine Google Co - op的自定义搜索引擎 .
  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).时产生的Google AdSense搜索框代码或Google合作的作品自定义搜索引擎(的CSE )的搜索框代码,记得要选择“打开结果在我自己的网站” ( Google AdSense for search的下开放的搜索结果页上一节)或“主机1搜索框和搜索结果对您自己的网站“ (自定义搜索引擎下,添加此搜索引擎您的网站上一节) 。

    Google AdSense for search结果在网站
    Google Co - op上的CSE结果在网站
    Key in the URL of the page on your site that the search results will appear.关键在网页的网址在您的网站上说,搜索结果就会出现。 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/).为在WordPress的网页页的父母,这个URL应该看起来就像这样: http://www.yourdomain.com/page-title/ (即http://www.mydigitallife.info/google-search/ ) 。 Note: trailing slash is insignificant, and can be dropped.注:斜线是微不足道的,并且可以下降。

  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.你可以做任何其他定制您的个人Google搜寻引擎,例如颜色,图案,风格,布局,语言, Google网域的国家,包括网站,等等。但是,它的出本文的讨论范围。
  4. After customizing the search box, generate and get the search box code and search results code.之后,自定义搜索框,产生并得到的搜索框代码和搜索结果代码。 (You must have both code, if not your configuration of search box is wrong.) (您必须有两个代码,如果不是您的配置搜索框是错误的) 。
  5. Create a custom page template for Wordpress based on your existing Page template.创建一个自定义的网页模板的WordPress根据您现有的网页模板。 You may retain or drop the sidebar (<?php get_sidebar(); ?> line), as sidebar may take up a lot of your webpage space.你可以保留或下拉工具栏“ ( < ? PHP的get_sidebar ( ) ; ? >线) ,作为工具栏可能会采取了很多您的网页空间。 If so you will need to adjust the width of search results accordingly during configuration and customisation of search box.如果是的话您将需要调整的宽度搜索结果因此在配置和定制的搜索框。 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.旁边,在WordPress模板是大量不结盟国家和定位用的CSS学标记,您可能需要删除学在CSS布局限制宽度(如果您移除工具栏)或修改的结构布局,在您的Google搜寻结果页面范本。 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):一般而言, Google搜索的搜索结果页模板,没有工具栏想同样喜欢这个(评论对模板的代码在斜体,可以安全地忽略不计) :
    <?php < ? PHP的
    /* / *
    Template Name: Search Results Page模板名称:搜索结果页
    */ * /
    ?> ? >
    The above section is important so that Wordpress will identify the new theme’s php file as a Page template. 上述条文是非常重要的,以便在WordPress将确定新的主题的PHP文件作为一个网页模板。 You can change the template name though. 你可以改变模板名称虽然。

    <?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. 在WordPress主题的标题,有可能也学标记,控制宽度在页面布局。 If it’s the case, the remove this line, the copy and paste the everything from Header template, and modify accordingly. 如果它的情况下,删除此行,复制并粘贴一切从标题模板,并修改相应的。

    <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. 再次,这可能会限制宽度布局,如果是的话,取而代之的是您自己的学结构,或干脆与<center>立即< /中心> (我用的) ,还是只删除该行。

    <!– Google Search Result Snippet Begins –> < ! -G oogle搜索结果的片段开始- >“
    <div id=”googleSearchUnitIframe”></div> <div id="googlesearchunitiframe"> < /学>

    <script type=”text/javascript”> <script type="text/javascript">
    var googleSearchIframeName = ‘googleSearchUnitIframe’;无功googlesearchiframename = ' googlesearchunitiframe ' ;
    var googleSearchFrameWidth = 700;无功googlesearchframewidth = 700人;
    var googleSearchFrameborder = 0 ;无功googlesearchframeborder = 0 ;
    var googleSearchDomain = ‘www.google.com’;无功googlesearchdomain = ' www.google.com ' ;
    </script> < /脚本>
    <script type=”text/javascript” <脚本类型= “文本/ JavaScript的”
    src=”http://www.google.com/afsonline/show_afs_search.js”>钢骨混凝土= “ http://www.google.com/afsonline/show_afs_search.js ” >
    </script> < /脚本>
    <!– Google Search Result Snippet Ends –> < ! -G oogle搜索结果片段两端- >“

    Replace above line with your own Google search results code (not Google search box code). 取代上述符合您自己的Google搜索结果代码(而不是Google搜索框代码) 。

    </div> < /学>
    If you don’t use any DIV above, just remove this line too. 如果您不使用任何部以上的,只需删除此行也。 If you use <center>, replace with </center>. 如果您使用<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.注意:您也可以排除主题的页眉和页脚(基本上等于空模板文件刚才只是一个路线,搜索结果代码,这将仅显示搜索结果,但失败的目的,整合的WordPress 。

  6. Save the new page template for your WordPress theme.保存新页模板为您的WordPress的主题。 You can give it any name.你可以给它以任何名义。
  7. Upload the new page template with search results code to your Wordpress theme’s directory.上传新的一页,模板与搜索结果代码到您的WordPress主题的目录。 So if you’re using Blogsome or Wordpress.com, you may be out of luck.因此,如果您使用的blogsome或wordpress.com ,您可能会出于运气。
  8. Create a new Wordpress static Page by clicking on “Write” then “Write Page”.创建一个新的WordPress静态网页点击“收件” ,然后选择“写网页” 。
    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).在关键的标题正如你所输入的网址显示搜索结果,在安装过程中的Google搜索框以上的(例如,如果您输入/ Google的搜索/作为网址的搜索结果页,您将需要输入Google搜索,作为网页标题) 。 You page-slug has to be exactly the same with the URL entered as shown in image below.您的网页塞要完全相同,并附上进入显示在下面的图片。
  9. On the Page Template at the side, choose Search Results Page (or whichever name you gave to the new template).在该网页上的模板在一边,选择搜索结果页(或两者的名称,你给的新模板) 。

    帖子模板和邮政塞

  10. Save and publish the page.保存并发布网页。
  11. Edit your template, and put in the search box code to anywhere you like the search box to appear.修改您的范本,并在搜索框代码的任何地方你喜欢的搜索框出现。
  12. The search results from Google is now integrated with WordPress blog.搜索结果来自Google现正结合的WordPress博客。 Whenever a user search with the Google search box from AdSense or Custom Search Engine, the search results will appear within your WordPress blog.每当一个用户的搜索与Google搜索框从AdSense或自定义搜索引擎,搜索结果将出现在您的WordPress博客。

For sample of integration and inline search results display in WordPress blog by Google AdSense for search, simply use the search box on top.为样本,一体化和内置搜索结果显示在WordPress博客由Google的AdSense for search ,只需直接使用搜索框顶端。 For Google Co-Op Custom Search Engine, check out为Google Co - op的自定义搜索引擎,请参阅 Google Medical Search Engine Google的医疗搜寻引擎 .

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要说明 :这是一个机器翻译网页是“按原样”提供的担保。 Machine translation may be difficult to understand.机器翻译可能很难理解。 Please refer to请参阅 original English article英文原版的文章 whenever possible.只要有可能。

Share and contribute or get technical support and help at分享和贡献,或取得技术的支持和帮助,在 My Digital Life Forums 我的数字生活论坛 .



7 Responses to “Integrate and Display Google AdSense for Search and Co-Op Custom Search Engine Results in WordPress Blog Page Template” 7回应“整合和展示Google AdSense for search的和合作的作品自定义搜索引擎结果在WordPress博客页面模板”

  1. NetBloke netbloke
    August 20th, 2007 05:26 2007年8月20日5时26分
    1

    I am trying to follow these instructions and am not having any luck with getting the results to appear on the search page.我想按照这些指示,我没有任何的运气得到的结果显示在搜索页上。

    I think I am not doing the static page bit right.我觉得我不是这样做的静态网页位的权利。 How do I make it a static page exactly?我要如何使其成为一个静态网页,正是?

  2. jameswillisisthebest
    September 9th, 2007 04:37 2007年9月9日4时37分
    2

    This is my first post这是我的第一篇文章
    just saying HI只是说喜

  3. get it from Boy!得到它从男孩!
    February 3rd, 2008 11:58 2008年2月3日11时58分
    3

    i really like your ad layouts and of course on how to implement it in wordpress.org sites..我真的很喜欢您的广告版面和当然就如何落实它在wordpress.org网站..

    i hope you make them into wodpress plugins instead so that it will be easier.我希望你让他们到wodpress插件不是,以便它会更容易。 I’m pretty sure your site will be more popular.我相当确信您的网站将会更受欢迎。

    thanks谢谢

  4. ragin'Geek ragin'geek
    May 10th, 2008 14:55 2008年5月10日14时55分
    4

    Is there a way to keep a published page from showing up?有没有办法保持出版的网页显示的呢? 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显示高层的页面,在菜单上,我可以压制我的搜索结果页?

  5. Wordpress Plugin Centre - Clean Wordpress Template - Integrate and Display Google AdSense for Search and Co-Op Custom wordpress插件中心-清洁的W ordPress模板-整合和展示Go ogleAd Sensefo rse arch的和合作的作品自定义
    June 12th, 2008 15:41 2008年6月12日15时41分
    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 [...] [ … … ]整合和展示Google AdSense for search的和合作的作品自定义整合,纳入,嵌入并显示Google搜寻结果从Google的AdSense for search与Google合作的作品自定义搜索引擎内部的模板和主题, WordPress的[ 。 .. ]

  6. Probando el nuevo Búsqueda Personalizada de Google - Primate Blog probando下午新搜索personalizada德的Google -灵长类博客
    June 15th, 2008 19:02 2008年6月15日19时02分
    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保存allá恢复新producto的Google , recomiendo埃斯特peque駉埃尔帕索1帕索阙我酒muy bien第电源integrar洛杉矶结果中英文下午模板德[ … … ]

  7. Radio电台
    August 14th, 2008 22:49 2008年8月14日22时49分
    7

    Buen artículo aunque las imágenes un poco borrosas. buen artículo aunque拉斯维加斯,图片搜索联合国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恩下午博客德美的Web单éxito ,查看硅siguiendo esta白皮书…

Leave a Reply离开的答复

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> 您可以使用这些标签:的<a href="" title=""> <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> <删除日期时间= “ ” >的<em>的<i> <q cite=""> <strike>的<strong>

Subscribe without commenting订阅无评论


Custom Search

New Articles新的条款,

Incoming Search Terms for the Article传入的搜索条件文章

adsense search wordpress AdSense搜索的WordPress - - AdSense for Search wordpress AdSense for search的在WordPress - - embedding google search in wordpress theme 嵌入Google搜索在WordPress的主题 - - google custom search template Google自定义搜索模板 - - Display your own name in google web page 显示您自己的名字,在Google网页 - - adsense search box, wordpress blog AdSense的搜索框, WordPress所博客 - - how to display results from my google search in my website 如何来显示结果从我的Google搜寻在我的网站 - - wordpress search to adsense search WordPress所搜索到AdSense搜索 - - error google search open results within my own site 错误的Google搜寻打开结果在我自己的网站 - - how to integrate google search into my website 如何整合Google搜索到我的网站 - - integrate google search in my website 整合Google搜索在我的网站 - - talian wordpress blog customize 塔利安WordPress所博客自定义 - - How to Embed Custom Google Search Results into 如何嵌入自定义Google搜索结果纳入 - - how to integrate google custom search engine to wordpress blog 如何整合Google自定义搜索引擎,以WordPress所博客 - - adsense search for wordpress AdSense搜索为在WordPress - - adsense for search no ads showing AdSense for search的没有广告显示 - - bulgaria customised search engine "google blog" 保加利亚定制的搜索引擎“ Google博客” - - embedding google ads in website 嵌入Google广告的网站 - - google adsense search box styles multiple choice, custom search Google AdSense的搜索框风格的选择题,自定义搜索 - - how to integrate google search on your own website 如何整合在Google上搜索您自己的网站 - - How to implement Google Adsense Search in Wordpress 如何落实Google AdSense的搜索在WordPress - - script to embed google search result page in or php page 脚本嵌入Google搜索结果页或PHP页面 - - sites displaying google search 网站上显示Google搜索 - - "AdSense for Search " php script “ AdSense for search的” PHP脚本 - - adsense search AdSense搜索 - - Customizing Google Search results display 自定义Google搜索结果显示 - - google custom search frame width Google自定义搜索框的宽度 - - How do I implement Adsense for search 我要如何实施AdSense for search - - remove "google custom search" from search result page 删除“ Google自定义搜索”从搜索结果页 - - ads not appearing google adsense for search 广告没有出现Google AdSense for search的 - - blog google adsense search box 博客的Google AdSense搜索框 - - How to incorporate Google Custom Search engine with Adsense into your Wordpress blog 如何把Google自定义搜索引擎与AdSense到您的WordPress所博客 - - how to add google search box to wordpress sidebar 如何添加Google搜索框的WordPress栏 - - integrating google search into wordpress 整合Google搜索到的WordPress - - "google search" script header adsense “ Google搜索”脚本标题的AdSense - - adsense for search limit search result AdSense for search的限制搜索结果 - - embed google custom search 嵌入Google自定义搜索 - - googleSearchFrameWidth adjust googlesearchframewidth调整 - - how to add AdSense for search to a page 如何将AdSense for search新增一个网页, - - how to add adsense search into wordpress 如何添加AdSense搜索到的WordPress - - modify width of adsense 修改宽度的AdSense - - display custom google search results 显示自定义Google搜索结果 - - google "adsense for search" toolbar Google的“ AdSense for search的”工具栏 - - google search integration for wordpress Google搜索一体化的WordPress - - started boxes style type multiple choice code creates this google adsense boxes 开始箱风格类型的选择题代码创建这个Google AdSense的箱子 - - “From Header” översättning “从标题översättning - - google custom css search bar Google自定义的CSS搜索栏 - - my name display instead of google 我的姓名显示,而是在Google - - adsense search cse not found 404 AdSense搜索的CSE没有发现404 - - code to integrate google adsense 代码整合的Google AdSense - -

  • Recent Comments:最近的评论: