I am trying to make a custom blogger template and in this i am using google structured data Json
how to use if, else in this json if data:post.firstImageUrl is avilable then - data:post.firstImageUrl else my custom url https://example.com/logo.png
"image": {
"@type": "ImageObject",
"width": 1920,
"height": 1080,
"if": "data:post.firstImageUrl",
"then": {
"url": "data:post.firstImageUrl"},
"else": {
"url": "https://example.com/logo.png",
},
"caption": "<data:post.title/>"
},
you need to use <b:if> in the body section, and put the first condition of your CSS inside a tag, then the else, and then another tag with the second condition.
In your style tag:
So in the body section, you put the condition