Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • @jsidea – I am not a WordPress professional, just a person with a little coding experience who is trying to get my sites to report well in Google’s Webmaster Tools. GWT told me I didn’t have any Rich Snippets, so I’ve been working on that. Apparently it’s important to Google. Be sure that you are registered with GWT.

    Here are some links for you;

    Header-Footer Plugin

    Google’s Structured Data Overview

    JSON-LD Playground

    A page with other GWT Tool Links (works if you have a site registered)

    Here is the code for the Website and Search Term String

    <script type="application/ld+json">
    {
      "@context": "https://schema.org/true",
        "@type": "WebSite",
      "url": "https://www.yoursite.com/",
      "potentialAction": {
        "@type": "SearchAction",
        "target": "https://www.yoursite.com/search?q={search_term_string}",
        "query-input":"required name=search_term_string"
      }
    }
    </script>

    Good luck. There are also plugins to add scripts to particular pages that could be useful for you.

    I forgot to mention that I am using the Header and Footer Plugin and inserted the script for Google’s SiteLink Search Box at the bottom of every Page & Post and this script in the header of every page:

    <script type="application/ld+json">
    {
      "@context": "https://schema.org/true",
        "@type": "WebSite",
      "url": "https://www.yoursite.com/",
      "potentialAction": {
        "@type": "SearchAction",
        "target": "https://www.yoursite.com/search?q={search_term_string}",
        "query-input":"required name=search_term_string"
      }
    }
    </script>

    My site is JohnSearles.com so you can see how the SDTT marks my site.

    Yes, the SiteLinks Search Box Plugin is now part of Yoast’s WordPress-SEO and has the same error as the Yoast does.

    I had some problems with the class-json-ld.php creating errors that showed up in Google’s Structured Data Testing tool.

    I added this code to my functions.php in my child theme

    add_filter( 'wpseo_json_ld_output', '__return_false' );

    Success! No errors messages now.

    OK – I tried to comment out lines 217 through 242 and that shut down my site. So I reinstalled WordPress-SEO to put the class-json-ld.php back to it’s original status.

    Then I added this code to my functions.php in my child theme

    add_filter( 'wpseo_json_ld_output', '__return_false' );

    Success! No errors messages now.

    @krazygal: the file is in the frontend folder of the wordpress-seo plugin and called class-json-ld.php.

    I believe the problem area is between lines 217-242 of the code.

    Here is the script version that works fine. Yoast’s should be similar in order to not get the error messages:

    <script type="application/ld+json">
    {
       "@context": "https://schema.org/true",
       "@type": "WebSite",
       "url": "https://www.sitename.com/",
       "potentialAction": {
         "@type": "SearchAction",
         "target": "https://query.sitename.com/search?q={search_term_string}",
         "query-input": "required name=search_term_string"
       }
    }
    </script>

    Good luck – please let me know what the fix is. Thanks.

    @krazygal: I tried adding the code from your link to my header but still get the same two error messages. I think part of the problem is the coding for the json-ld.php file on this Yoast plugin.

    http:schema.org/true – Google’s error message says: The property is not recognized by Google for an object of type PropertyValueSpecification.

    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "WebSite",
      "url": "https://www.saatler.com/",
      "potentialAction": {
        "@type": "SearchAction",
        "target": "https://www.saatler.com/arama?ara={search_term_string}",
        "query-input":"required name=search_term_string"
      }
    }
    </script>

    This page explains the error and how to fix it: https://developers.google.com/structured-data/slsb-overview?

    however, I haven’t figured out what they mean yet, other than installing Google’s SiteLink Search Box code, which works fine btw. But still getting the 2 error messages.

    Apparently this has something to do with Google’s Site Link Search Box. I have installed the code below every page and post but still get the two Structured Data error messages.

    I tried adding the SiteLinks Search Box Plugin https://www.ads-software.com/plugins/sitelinks-search-box/
    which now gives me 4 errors. Apparently this plugin was added to Yoast’s WP-SEO for the last update so it is redundant, and doubling the error messages.

    Here is Google’s page with the instructions for the SiteLink Search BoxBox.https://developers.google.com/structured-data/slsb-overview?. I added the SLSB and it works fine but I still get the 2 error messages.

    I am wondering if I have to add all my keywords in as the search_term_string?

    From Google:
    1. Using the search URL pattern in the target property, replace the curly braces and all that’s inside of it with a search query.
    2. Copy and paste this into a browser to verify that it leads to a valid search results page on your site. For instance, if your target property is https://www.example-petstore.com/search?q={searchTerm}, then https://www.example-petstore.com/search?q=collars and https://www.example-petstore.com/search?q=leashes should both lead to search result pages on your site about “collars” and “leashes.”
    3. The value for the name attribute of the query-input property should match the string that’s inside the curly braces in the target property.

    Several sites have said to wait until Google recognizes the SiteLink Search Box on your site. Maybe this will clear up in a few days.

    Thread Starter jsearles

    (@jsearles)

    How I fixed the problem: the images weren’t in a WordPress Gallery, so I edited the page and added a gallery. Still didn’t work – images only opened one at a time and on an image page. Not very nice or pretty.

    I noticed that ATB worked in my other site and compared the Gallery settings with the Text Editor. The one with ATB working had the code [gallery link="file" columns="4" .......] and the one that wasn’t working didn’t have the link=”file” part.

    So I typed in link=”file” manually and now it works!

    Thread Starter jsearles

    (@jsearles)

    Now I have a page where only 3 of the 15 images enlarge on click. The rest just sit there in some in-between mode: https://www.searlesart.com/modern-metal-wall-art/
    I probably have a conflict with some other plugin. Guess I’ll have to find another image plugin.

Viewing 10 replies - 1 through 10 (of 10 total)