Recipe Schema Markup withou plugin

Posted in: Newspaper
Post count: 361

Dear guys,

I moved my blog from blogspot to wordpress. For my recipes I had already created working Schema Markups for Recipes. I found some tutorials that explained how to use such Schema Markups by implementin them in a custom field in wordpress. So I did and implemented the following code in the header.php to call the Schema Markup:

// Schemamarkup
<?php
$schemamarkup = get_post_meta(get_the_ID(), ‘schemamarkup’, true);
if(!empty($schemamarkup)) {
echo $schemamarkup;
}
?>

In my test-theme it worked fine, but now I’m using the Newspaper Theme and the code is completely ignored. Where the problem could be?

Greetings Kathrin

Post count: 35449

Hi,

Is possible that the code to not be set in the right place, using Newspaper theme there are three headers.php if you are using standard pack and a standard header the code need to be set in this header file -> wp-content/plugins/td-standard-pack/Newspaper/header.php if you are using a cloud header from tagDiv Cloud Library you need to set the code in this header file -> header.php adn if the tagDiv Composer is not enable the theme will use this header file -> wp-content/themes/Newspaper/header.php

Hope this will help you!
Thank you!

Post count: 361

Thank you very much! It was the first solution, the second one I tried without luck all the time!

Greetings Kathrin

Post count: 35449

Hi,

I’m glad that I was able to help you, if you have other questions related to our theme, just let us know!

Have a nice day!

Post count: 361

Dear Calin, I have changed the header from the standard-pack to a header from the cloud-template. Now I have added the Schema-Markup-Code to the header.php which I could access via Design –> Theme Editor and I also tried it via FTP like you described it in your last point. But it doesn’t work. How can I fix it? The standard-pack I have deactivated.

Thank you very much!

Post count: 35449

Hi,

If the tagDiv Standard Pack is disable then you need to set the code in this files -> wp-content/plugins/td-composer/legacy/Newspaper/header.php

Hope this will help you!
Thank you!

Post count: 361

I’ve tried and tried, but it doesn’t work. The code is completely ignored when I want to prove it in the structured data tool from Google. But now the header shows //schemamarkup in the frontend: http://b96n967.myraidbox.de/2019/11/kuerbiskuchen-vom-blech-mit-oel-und-schokolade-kuerbis-kernoel.html

I need a working schema-markup.

🙁

Greetings Kathrin

Post count: 35449

Hi,

Please note that our theme is using a schema also if you want you can use Yoast SEO for a more complex schema schema -> https://yoast.com/schema-org-is-hard-were-making-it-easy/
You could try other plugins for the recipe data
https://schema.org/Recipe
Surely one of the existing plugins will work as needed
https://colorlib.com/wp/wordpress-recipe-plugins/

Also if the code need to be set in the header, then there is only two places, on if you are using the tagDiv Standard Pack (https://i.imgur.com/M9lZvAq.png) in -> wp-content/plugins/td-standard-pack/Newspaper/header.php and the second one if the tagDiv Standard Pack is deactivate this is in -> wp-content/plugins/td-composer/legacy/Newspaper/header.php

Thank you!

Post count: 361

I have already found a working plugin, but each plugin needs resources and this was such a simple solution. The first time it worked perfectly but after deactivating the standard pack nothing happens. The code is not working anymore.

Don’t you have any idea?

Greetings Kathrin

Post count: 35449

Hi,

I think that most of plugins are interpreted only the standard post templates that are in tagDiv Standard Pack, using cloud templates, you practicality use custom post types, maybe the plugins can not identify these cloud templates.
So the code is not working if you set in files of tagDiv Composer plugin when tagDiv Standard Pack is disable?

Thank you!

Post count: 361

Dear Calin, I have chosen a plugin now. The code from the first post works perfectly with the standard-pack, but as soon as I disable it, the schema markup isn’t shown anymore. It seems that the header from the composer isn’t used… How this could be?

Greetings Kathrin

Post count: 35449

Hi,

If there are still some problems, you can send us an email at contact@tagdiv.com and provide admin login, as well as cPanel. We will take a look. Include a link to this topic in the email.

Thank you!

Viewing 12 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic.