Announcement

Collapse
No announcement yet.

Adding a Google sitelinks searchbox

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SidFeyDesigns
    replied
    Sorry I missed your latest question somehow.

    What entities are you using to display the url?

    I've been using this with no issues for quite some time.

    Code:
    <-script type="application/ld+json"->
        {
            "@context": "https://schema.org",
            "@type": "WebSite",
            "url": "&mvte:urls:SFNT:auto;",
            "potentialAction": [{
                "@type": "SearchAction",
                "target": {
                    "@type": "EntryPoint",
                    "urlTemplate": "&mvte:urls:SRCH:auto_sep;Search={Search}"
                },
                "query-input": "required name=Search"
            }]
        }
    <-/script->

    Leave a comment:


  • SidFeyDesigns
    replied
    Your application/ld+json markup is correct.

    Apparently Google rarely shows a sitelinks search box and the markup has no effect on Google's decision to show it or not.

    This article has some good info on that. https://www.searchenginejournal.com/...-shown/365290/

    Leave a comment:


  • lesliekirk
    replied
    I'm having an issue with the Sitelinks Search Box (WebSite) again. I thought this had been resolved but I'm seeing an error in the Google Search Console
    Invalid items are not eligible for Google Search's rich results.
    The error is
    Missing field "url"
    I would think it would be affecting more pages on the site but it seems only to be a handful (unless the Google dam is about to break).

    Leave a comment:


  • lesliekirk
    replied
    Well, it's been longer than the store owner would like...

    Leave a comment:


  • Dan - Glendale Designs
    replied
    In reading up on this some more, the following would be correct as long as the url and target have been updated properly to match the store in question. How long has it been implemented? At first glance I thought you replaced the {search_term_string} with the actual query, but that doesn't appear to be the case. This is just to trigger the display of the sitelink search box if your site qualifies. As usual, you are at Google's discretion as to if/when a sitelink search box appears for a given query.

    Code:
    <script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "WebSite",
      "url": "https://www.example.com/",
      "potentialAction": {
        "@type": "SearchAction",
        "target": "https://query.example.com/search?q={search_term_string}",
        "query-input": "required name=search_term_string"
      }
    }
    </script>
    Last edited by Dan - Glendale Designs; 08-10-16, 03:15 PM.

    Leave a comment:


  • lesliekirk
    replied
    If I remove the curly braces it fails validation. If I use &mvte:global:Search; it fails validation. If I use q={search_term_string} it passes validation.

    Leave a comment:


  • Dan - Glendale Designs
    replied
    Try removing the curly braces.

    Leave a comment:


  • lesliekirk
    replied
    FYI - I have also tried using this schema code

    Code:
    <script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "WebSite",
      "url": "https://www.example.com/",
      "potentialAction": {
        "@type": "SearchAction",
        "target": "https://query.example.com/search?q={search_term_string}",
        "query-input": "required name=search_term_string"
      }
    }
    </script>
    It passes validation but never got the sitelinks search box added to Google

    Leave a comment:


  • lesliekirk
    started a topic Adding a Google sitelinks searchbox

    Adding a Google sitelinks searchbox

    I'm trying to add the schema.org markup on the SFNT to hopefully get Google to add the Sitelinks search box to it's search results. I can't seem to get it past the urlTemplate

    Code:
    http://www.domain.com/search.html?q={} (There is an error in your Sitelinks Search Box template: INVALID_SYNTAX.)
    I'm using

    Code:
    <div id="search-box" itemscope itemtype="http://schema.org/WebSite">
         <meta itemprop="url" content="http://www.domain.com/"/>
            <div class="container-fluid">
                <span class="glyphicon glyphicon-remove" id="search-form-close"></span>
                <form method="get" action="/search.html" class="form-inline clearfix" role="form" itemprop="potentialAction" itemscope itemtype="http://schema.org/SearchAction">
                <meta itemprop="target" content="http://www.domain.com/search.html?q={&mvte:global:Search;}"/>
                    <input itemprop="query-input" type="text" name="q" value="&mvte:global:Search;" id="search" class="form-control searchspring-query" autocomplete="off" placeholder="SEARCH..." />
                    <input type="hidden" class="form-control" value="GO">
                </form>
            </div>...
    I'm guessing that the &mvte:global:Search; isn't working because it really doesn't have a result until the search has been completed.

    Has anyone successfully added this?

    ​​​​​​https://developers.google.com/search...inks-searchbox
    Last edited by lesliekirk; 08-05-16, 08:13 AM.
Working...
X