• Hi All,

    I’ve searched and have not found this posted. I was wondering if anyone else has implemented Schema JSON-LD code for your wordpress site using the ‘Custom Script Plugin’ to bypass the loop.

    I am not the best with messing with php files and as I know there are a lot of new schema plugins and new ones everyday, I guess I just like the idea of inputting the code myself.

    Anyone else do this? It all shows in Google’s Schema tester so I believe it does work.

    https://www.ads-software.com/plugins/custom-script-integration/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator bcworkz

    (@bcworkz)

    You could use the plugin to insert JSON-LD schema data, but you still need to generate the schema somehow. I don’t think the plugin does anything to bypass the loop, nor do I understand why that is necessary.

    If you have JSON-LD schema that you want placed on a particular page, you can simply enter it in the page’s content using the text tab. It’s only if you want it auto-generated do you need PHP code.

    Thread Starter schemalover

    (@schemalover)

    Hello,

    Thanks for the reply.

    Like I mentioned, I am not the best when it comes to code related stuff. I am able to generate the validated Schema JSON-LD code as there are related tools out there to assist with this.

    But I did read somewhere that by placing it right into the text editor in WP, it will not get pass the loop?

    I could be mistaken about this also and looking for confirmation about that subject as well. Placing the code into the text editor would be idea if that is all I needed to do with the JSON-LD schema code.

    Moderator bcworkz

    (@bcworkz)

    Some HTML is subject to deletion or alteration by content filters, which are not really part of the loop, but I know what you mean now. I’ve never had any problem with code entered this way as long as it’s inside <script> </script> tags. This includes Google Analytics conversion code, so it would be quite obvious if such code was not working due to filtering.

    Thread Starter schemalover

    (@schemalover)

    So, would you say that it would get pass the loop then by just placing the cold in the text editor?

    If you look at this article towards the end, this person gets into manipulating php files to get his schema to work. Not sure why he would do all this if he could just paste directly into text editor.

    https://builtvisible.com/implementing-json-ld-wordpress/

    Moderator bcworkz

    (@bcworkz)

    In his case the JSON-LD is created dynamically to fit what ever author wrote the post. I was thinking in your case you had static schema. If values in you schema are dependent on PHP variables, then no, do not put PHP code into the text edit field. It will not be disturbed, but it will not execute either.

    There is a plugin that allows PHP code to be executed in content somehow. I’ve not used it, but it’s popular with people who are not full fledged coders. It may be a way to have dynamic schema on any particular post or page.

    Thread Starter schemalover

    (@schemalover)

    Thanks, I guess I’m a bit confused by your replies at this point as doing anything PHP related is not what I am asking. Not sure if we’re on the same page. Hoping someone else will give some info on this matter.

    Thanks anyways.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Using the 'Custom script Plugin' to get pass the loop for Json Ld Schema’ is closed to new replies.