Answers below.
One other small bug (I think) - when I change the font-size in the backend for h1, h2, h3, etc., it updates the font size in the css, but it also leaves in the old font size (grouped in the same brackets). And because the old font size is lower in the brackets, that’s the one that gets used. If you check the font-size for h3 on this page, for instance:
https://paleomagazine.com/how-to-start-ketogenic-diet/amp(Note that I’ve added in custom css to fix it at the moment, but you can see in the code where it’s got both 1.3em and 0.9em. 1.3em is the size I updated in the backend.)
And by the way, it’s just my thought, but you’ll probably do very well marketing this for Recipes. Still a ton of food and health bloggers, and good AMP + Schema might make more difference going forward for recipes than anything else, especially with the introduction of carousels and other things by Google.
1 - That issue must have been a caching problem, because it went away.
2 - Your hook makes complete sense for the microdata. Should be easy on our end.
For our JSON LD data, we get it one of 2 ways. If it’s a recipe post, then the recipe plugin we use (Tasty Recipes) builds that data.
If it’s not a recipe, here’s the code I wrote into my functions.php to get it and build it. I hard-coded a few things (Organization, url, etc.), but those are things you already have inputs for on the backend.
function add_article_schema() {
if( is_single() ) {
if( !has_tag( 'Recipe' ) ) {
$article_Link = get_permalink();
$article_Title = get_the_title();
$article_Author = get_the_author_meta('display_name');
$article_Description = get_excerpt(100);
$options = thrive_get_theme_options();
$postID = get_the_ID();
$featured_image_data = thrive_get_post_featured_image($postID, $options['featured_image_style']);
$featured_image = $featured_image_data['image_src'];
$articleDate = get_the_date('Y-m-d');
$articleModifiedDate = get_the_modified_date('Y-m-d');
echo <<<FIRBLOCK<script type="application/ld+json">{
"@context": "
http://schema.org",
"@type": "Article",
"url": "$article_Link",
"name": "$article_Title",
"headline": "$article_Title",
"datePublished": "$articleDate",
"dateModified": "$articleModifiedDate",
"author": "$article_Author",
"description": "$article_Description",
"image": "$featured_image", "publisher": { "@type": "Organization", "name": "Paleo Flourish", "url": "
http://www.paleomagazine.com/", "logo": { "@type": "ImageObject", "url": "
http://paleomagazine.com/wp-content/uploads/2017/04/paleo-flourish-logo-site-small.png", "width": 200, "height": 41 } }}</script>FIRBLOCK;
}
}}
add_action( 'wp_head', 'add_article_schema' );
Jeremy HendonLive the Good Life
m:646.206.5553 |
e:[email protected] |
w:http://jeremyhendon.com

On Apr 30, 2017, at 6:41 PM, WeeblrPress <[email protected]> wrote:
[WeeblrPress] Reply to your public ticket #29 Fatal Error Installation [weeblrAMP]