• Resolved allm

    (@realblueorange)


    I don’t want to burden you with more questions, but…

    This question does not seem like a big thing, so you might want to safe it for a rainy day.

    Anyway: I started looking at the ld+json scripts that the plugin adds to the source of a page. I noticed the following:

    "potentialAction":{"@type":"SearchAction","target":"http:www.example.com/?s={search_term_string}"

    I am guessing that this specifies how the search function works on this site. But… I have disabled the search function by redirecting all ?s= URLs. I am not quite sure if that is detectable in the plugin.

    Just wanted to let you know.

    And another one: is there a reason why the ld+json breadcrumbs definition is not in the source of my pages?

    This is all new to me, so maybe this is all not so important. I’ll leave it up to you.

    https://wordpress.org/plugins/autodescription/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter allm

    (@realblueorange)

    Oops, probably found the answer myself:

    Is it the “Sitelinks Search Box” setting? If that’s the case I can set this to resolved…

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi allm,

    That’s right, it’s the Sitelinks Search Box :). I don’t know if I can detect search being disabled, could you show me the code you’re using?

    The reason why ld+json breadcrumbs aren’t always available is because it’s only supported on Posts, Pages and Products.

    I hope this helps! Have a great day!

    Thread Starter allm

    (@realblueorange)

    Hi Sybre,

    Basically I do an action on ‘template_redirect’ and in that action I check if $_GET[‘s’] has a value (and we’re on a search results page). In that case I do a redirect to a certain page that explains there is no search function on the website.

    In case you want to know exactly I can cut, adapt and paste my code.

    Regarding the ld+json breadcrumbs: should they be there if the website has either posts, pages or products? That sounds a bit like ALL websites. The website that I am now testing has pages but no ld+json breadcrumbs. “Enable Breadcrumbs?” is checked.

    By the way: Right now there are no ld+json scripts visible in the source at all. Even when “Sitelinks Search Box” is checked the code that I gave above is now gone. I updated to the latest version (2.6.3). Any ideas?

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi allm,

    That’s difficult to test, as you’re doing a plain redirect, rather than adjusting globally readable values. It’s testable, but it will require a “cron job”, which I’m not fond of. It’s also very vulnerable to mistakes at that point.

    The breadcrumbs should work on all websites, but are only output “on” Posts, Pages and Products :). Not on other post types or archives.

    The Sitelinks Search Box, the Website Name and the Knowledge Graph are only outputted on the front page. Have you checked them out there?

    I hope this clears things up! 🙂

    Thread Starter allm

    (@realblueorange)

    Hi Sybre,

    The Sitelinks Search Box is no big deal. I can disable it right from the settings page.

    I do not see anything regarding breadcrumbs in the source of the pages of the website that I am testing. Can you tell me what setting(s) need to be on and what I should see in the html?

    Thanks a lot!

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi allm,

    I now finally have time for other questions, like this one :).

    For Pages, you can see it when you have a “parent page”.
    For Posts, you can see it when you have a category assigned (this is a WordPress Core requirement).

    For the latest patch notes post, the output will be like this, somewhere at the bottom of the meta output of The SEO Framework:

    <script type="application/ld+json">{"@context":"http:\/\/schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"https:\/\/theseoframework.com\/","name":"The SEO Framework"}},{"@type":"ListItem","position":2,"item":{"@id":"https:\/\/theseoframework.com\/category\/changelog\/","name":"Changelog"}},{"@type":"ListItem","position":3,"item":{"@id":"https:\/\/theseoframework.com\/changelog\/2-6-4-biographic-consistency\/","name":"2.6.4 – Biographic Consistency"}}]}</script>

    You can check out if Google recognizes the Structured Data using their Structured Data Testing Tool.

    I hope this helps! If you really can’t find them anywhere, let me know.
    I see you’re cautious about your website. If you have any details you wish to share that might help me pinpoint issues, you can do that confidentially right here.

    Have a great day! 🙂

    Thread Starter allm

    (@realblueorange)

    Hi Sybre,

    Thanks again.

    “Pages only when there is a parent page”: confirmed. Earlier I only checked on toplevel pages.

    Just checked posts: also confirmed.

    So it all looks good.

    If there is anything I am cautious about I will use your contact form. So far everything is OK.

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘search in ld json’ is closed to new replies.