I have researched this issue on Stackoverflow and elsewhere and though I have found hundreds of pages of information, I have not been able to figure out why the Facebook Object Debugger reports that there are extraneous properties. I have tried it with and without the app_id.
The object debugger show this for input url
Extraneous Property Objects of this type do not allow properties named 'og:locale'.
Extraneous Property Objects of this type do not allow properties named 'og:site_name'.
Extraneous Property Objects of this type do not allow properties named 'og:title'.
Extraneous Property Objects of this type do not allow properties named 'og:type'.
Extraneous Property Objects of this type do not allow properties named 'og:url'.
Extraneous Property Objects of this type do not allow properties named 'og:image'.
Extraneous Property Objects of this type do not allow properties named 'og:image:secure_url'.
Extraneous Property Objects of this type do not allow properties named 'og:image:type'.
Extraneous Property Objects of this type do not allow properties named 'og:image:width'.
Extraneous Property Objects of this type do not allow properties named 'og:image:height'.
Extraneous Property Objects of this type do not allow properties named 'product:price:amount'.
Extraneous Property Objects of this type do not allow properties named 'product:price:currency'.
Extraneous Property Objects of this type do not allow properties named 'og:description'.
But is able to construct the following Open Graph properties:
fb:app_id 734911290261034
og:url https://www.moodswingsonthenet.com/products/alchemy-england-gothic-fairy-ear-wrap-cuff-left-side-pierced
og:type product
og:title Alchemy England Gothic Fairy Ear Wrap Cuff Left Side Pierced
og:locale
{
"locale": "en_us"
og:image (DOES SHOW IMAGES BUT THERE ARE 2 SETS OF THE SAME IMAGES)
og:description Authorized Alchemy England retailer and shipped from the USA Whispering fairy left ear wrap for pierced ear Surgical steel post Hypoallergenic - lead, cadmium, and nickel free Made of fine English pewter Handcrafted in England Includes Alchemy England warranty and care instructions Guaranteed to be genuine Alchemy Engl
og:site_name moodswingsonthenet
og:updated_time 1577676246
product:price Array of length: 1
{
"amount": 34.95,
"currency": "USD"
}
product:is_product_shareable 1
og:image:alt
social-meta-tags.liquid
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
<meta property="fb:app_id" content="734911290261034" />
{% comment %}
Open graph tags
{% endcomment %}
{% if template contains 'index' %}
<meta property="og:type" content="website" />
<meta property="og:title" content="Moodswings Inc" />
<meta property="og:url" content="{{ canonical_url }}" />
{% if settings.home_page_content != blank %}
<meta property="og:description" content="{{ pages[settings.home_page_content].content | strip_html | escape }}" />
{% else %}
<meta property="og:description" content="{{ page_description }}" />
{% endif %}
{% elsif template contains 'product' %}
<meta property="og:locale" content="en_us" />
<meta property="og:site_name" content="{{ shop.name }}" />
<meta property="og:title" content="{{ product.title }}" />
<meta property="og:type" content="product" />
<meta property="og:url" content="{{ canonical_url }}" />
{% for image in product.images limit:3 %}
<meta property="og:image" content="http:{{ image.src | img_url: '1024x1024' }}" />
<meta property="og:image:secure_url" content="https:{{ image.src | img_url: '1024x1024' }}">
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="{{ image.width | remove: "px" }}" />
<meta property="og:image:height" content="{{ image.height | remove: "px" }}" />
{% endfor %}
<meta property="og:price:amount" content="{{ product.price | money_without_currency | strip_html | escape }}" />
<meta property="og:price:currency" content="USD" />
{% elsif template contains 'article' %}
<meta property="og:type" content="article" />
<meta property="og:title" content="{{ article.title | strip_html }}" />
<meta property="og:url" content="{{ canonical_url }}" />
{% if article.image %}
<meta property="og:image" content="http:{{ article | img_url: '1024x1024' }}" />
<meta property="og:image:secure_url" content="https:{{ article | img_url: '1024x1024' }}" />
{% endif %}
{% elsif template == 'password' %}
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ shop.name }}" />
<meta property="og:url" content="{{ shop.url }}" />
{% if settings.logo_use_image %}
<meta property="og:image" content="http:{{ 'logo.png' | asset_url }}" />
<meta property="og:image:secure_url" content="https:{{ 'logo.png' | asset_url }}" />
{% endif %}
{% else %}
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ page_title }}" />
<meta property="og:url" content="{{ canonical_url }}" />
{% if settings.logo_use_image %}
<meta property="og:image" content="http:{{ 'logo.png' | asset_url }}" />
<meta property="og:image:secure_url" content="https:{{ 'logo.png' | asset_url }}" />
{% endif %}
{% endif %}
{% unless template contains 'index' %}
{% if page_description %}
<meta property="og:description" content="{{ page_description }}" />
{% endif %}
{% endunless %}
{% comment %}
This snippet renders meta data needed to create a Twitter card.
{% endcomment %}
{% if template contains 'article' and article.image %}
<meta name="twitter:card" content="summary_large_image" />
{% elsif template == 'index' and slider_enabled %}
<meta name="twitter:card" content="summary_large_image" />
{% else %}
<meta name="twitter:card" content="summary" />
{% endif %}
{% unless settings.social_twitter_url == blank %}
<meta name="twitter:site" content="#{{ settings.social_twitter_url | split: 'twitter.com/' | last }}" />
{% endunless %}
{% if template == 'index' %}
<meta name="twitter:title" content="{{ page_title }}" />
{% if settings.home_page_content != blank %}
<meta name="twitter:description" content="{{ pages[settings.home_page_content].content | strip_html | truncate: 200, '' | escape }}" />
{% else %}
<meta name="twitter:description" content="{{ page_description | escape }}" />
{% endif %}
{% if slider_enabled %}
{% for i in (1..6) %}
{% capture slide %}slide_{{ i }}{% endcapture %}
{% capture slide_img %}slide_{{ i }}.jpg{% endcapture %}
{% if settings[slide] %}
<meta name="twitter:image" content="https:{{ slide_img | asset_img_url: '1024x1024' }}" />
{% break %}
{% endif %}
{% endfor %}
{% endif %}
{% elsif template contains 'product' %}
<meta name="twitter:title" content="{{ product.title | strip_html | escape }}" />
<meta name="twitter:description" content="{{ product.description | strip_html | truncate: 200, '' | escape }}" />
<meta name="twitter:image" content="https:{{ product | img_url: 'large' }}" />
<meta name="twitter:image:width" content="480" />
<meta name="twitter:image:height" content="480" />
{% elsif template contains 'article' %}
<meta name="twitter:title" content="{{ article.title | strip_html | escape }}" />
<meta name="twitter:description" content="{{ article.excerpt_or_content | strip_html | truncate: 200, '' | escape }}" />
{% if article.image %}
<meta property="twitter:image" content="https:{{ article | img_url: '1024x1024' }}" />
{% endif %}
{% endif %}
Please help me figure out what is wrong with my code, thank you!!
Related
I start to build a jekyll site on github following this BLOG.
OK it works.
I would like to add some math stuffs in my blog, I add a "mathjax.html" in "include folder"
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: {
autoNumber: "AMS"
}
},
tex2jax: {
inlineMath: [ ['$','$'],
['\(', '\)'] ],
displayMath: [
['$$','$$'] ],
processEscapes:true,
}
});
and then include this file in Layouts files(default.html page.html post.html)
<div class="wrapper-footer">
<div class="container">
<footer class="footer">
{% include svg-icons.html %}
</footer>
</div>
</div>
{% include analytics.html %}
</body>
</html>
{% include mathjax.html %}
default.html
---
layout: default
---
{% include mathjax.html %}
<article class="page">
<h1>{{ page.title }}</h1>
<div class="entry">
{{ content }}
</div>
</article>
page.html
---
layout: default
---
<article class="post">
<h1>{{ page.title }}</h1>
<div class="entry">
{{ content }}
</div>
<div class="date">
Written on {{ page.date | date: "%B %e, %Y" }}
</div>
{% include disqus.html %}
</article>
{% include mathjax.html %}
post.html
and add this line in post file
$$ sin(x^2) $$
As a result ,the page show nothing ...
what 's wrong with it?
hope you all are well, i need your help as i am facing an issue on my wordpress website when i post my website url on my facebook page it show an random image which i don't want
In this image you easily understand which issue i am talking about, i want logo of website to be shown in place of space image, Please anyone helpme out of it , Thank you in advance
You need to put open graph tags in your header.php. I usually use this combination:
<?php
$theme = wp_get_theme();
$screenshot_url = esc_url( $theme->get_screenshot() );
if ( is_home() ): ?>
<meta property="og:url" content="<?php echo get_home_url(''); ?>" />
<meta property="og:type" content="website" />
<meta property="og:title" content="<?php echo get_bloginfo('name'); ?>" />
<meta property="og:description" content="<?php echo get_bloginfo('description'); ?>" />
<meta property="og:image" content="<?php echo $screenshot_url; ?>" />
<?php elseif( is_category() ):
$cat_id = get_query_var('cat');
$cat_name = get_cat_name($cat_id);
$cat_desc = (category_description( $cat_id ) != '') ? category_description( $cat_id ) : get_bloginfo('description');
?>
<meta property="og:url" content="<?php echo get_category_link($cat_id); ?>" />
<meta property="og:type" content="website" />
<meta property="og:title" content="<?php echo $cat_name; ?>" />
<meta property="og:description" content="<?php echo $cat_desc; ?>" />
<meta property="og:image" content="<?php echo $screenshot_url; ?>" />
<?php else: ?>
<meta property="og:url" content="<?php the_permalink(); ?>" />
<meta property="og:type" content="website" />
<meta property="og:title" content="<?php echo get_the_title(); ?>" />
<meta property="og:description" content="<?php echo get_the_excerpt(); ?>" />
<?php if(has_post_thumbnail()):
$url = wp_get_attachment_url( get_post_thumbnail_id() );
?>
<meta property="og:image" content="<?php echo $url; ?>" />
<?php else: ?>
<meta property="og:image" content="<?php echo $screenshot_url; ?>" />
<?php endif; ?>
<?php endif; ?>
I put separate OG tags for home, category and other pages, with a fallback to theme image (this prevents random image being selected).
Hope this helps.
You can use this Plugin to fix your issues https://wordpress.org/plugins/facebook-thumb-fixer/ or you can follow this http://www.wpbeginner.com/wp-tutorials/how-to-fix-facebook-incorrect-thumbnail-issue-in-wordpress/
If you not get any solutions, let me know. Thanks
Try putting OpenGraph image tag like so
<meta property="og:image" content="link to your logo" />
Try this:
<meta property="og:image" content="<?php the_post_thumbnail(); ?>" />
<meta property="og:title" content="<?php the_title(); ?>" />
<meta property="og:description" content="<?php the_content(); ?>" />
<meta property="og:site_name" content="<?php bloginfo('name'); ?>" />
<meta property="og:type" content="article" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="<?php the_permalink(); ?>" />
<meta property="og:title" content="<?php the_title(); ?>" />
<meta property="article:published_time" content="<?php echo get_the_time(); ?>" />
<meta property="article:modified_time" content="<?php the_modified_date(); ?>" />
<meta property="article:author" content="<?php the_author(); ?>" />
<meta property="article:section" content="Featured" />
<meta property="article:tag" content="<?php the_tags(); ?>" />
http://happybloggerplaza.com/how-to-fix-thumbnail-image-facebook/
https://wordpress.org/plugins/facebook-thumb-fixer/other_notes/
How can I pass the variable data from Shopify form ( I made a template for a page with a form inside that ask customer to choose one product & put name, email, address and more ) to be send in as email? Is it possible to get the data then pass it to some third party apps like Mailchimp and that 3rd party app will send it via email to the customer containing the data?
To make it short, my question is:
How to create custom form then pass data in an email to be sent to the customer?
I have used a customized ajaxchimp jquery plugin to integrate shopify contact form with mailchimp.
{% form 'contact' %} {% comment %} Successful message {% endcomment %} {% if form.posted_successfully? %}
<p class="note form-success">
{{ 'contact.form.post_success' | t }}
</p>
{% endif %} {{ form.errors | default_errors }}
<div class="grid grid--small">
<div class="grid__item large--one-half">
<label for="ContactFormName" class="hidden-label">{{ 'contact.form.name' | t }}</label>
<input type="text" id="ContactFormName" class="input-full" name="contact[name]" placeholder="{{ 'contact.form.name' | t }}" autocapitalize="words" value="{% if form.name %}{{ form.name }}{% elsif customer %}{{ customer.name }}{% endif %}">
</div>
<div class="grid__item large--one-half">
<label for="ContactFormEmail" class="hidden-label">{{ 'contact.form.email' | t }}</label>
<input type="email" id="ContactFormEmail" class="input-full" name="contact[email]" placeholder="{{ 'contact.form.email' | t }}" autocorrect="off" autocapitalize="off" value="{% if form.email %}{{ form.email }}{% elsif customer %}{{ customer.email }}{% endif %}">
<input type="hidden" id="ContactFormHidden" name="contact[email]" value="{% if form.email %}{{ form.email }}{% elsif customer %}{{ customer.email }}{% endif %}">
</div>
</div>
<label for="ContactFormPhone" class="hidden-label">{{ 'contact.form.phone' | t }}</label>
<input type="tel" id="ContactFormPhone" class="input-full" name="contact[phone]" placeholder="{{ 'contact.form.phone' | t }}" pattern="[0-9\-]*" value="{% if form.phone %}{{ form.phone }}{% elsif customer %}{{ customer.phone }}{% endif %}">
<label for="ContactFormMessage" class="hidden-label">{{ 'contact.form.message' | t }}</label>
<textarea rows="10" id="ContactFormMessage" class="input-full" name="contact[body]" placeholder="{{ 'contact.form.message' | t }}">{% if form.body %}{{ form.body }}{% endif %}</textarea>
<input type="submit" class="btn right" value="{{ 'contact.form.send' | t }}">
<label for="mc-email"></label>
{% endform %}
{{ 'mailchimp.js' | asset_url | script_tag }}
<script>
$('#ContactFormEmail').change(function() {
var email = $(this).val();
$('#ContactFormHidden').val(email);
});
</script>
<script>
$('#contact_form').ajaxChimp({
url: 'https://cyberite.us4.list-manage.com/subscribe/post?u=858232f1e77dc411cb2405b5f&id=502f26188f',
});
</script>
I have added below html code to a product page on one of our websites:
<div itemtype="http://schema.org/Offer" itemscope="" itemprop="offers">
<div class="product-type-data">
<div itemtype="http://schema.org/Offer" itemscope="" itemprop="offers" class="price-box">
<span id="product-price-118" class="regular-price">
<span itemprop="price" class="price">30,00 €</span>
</span>
</div>
<p class="availability in-stock">Verfügbarkeit: <span>Auf Lager</span></p>
<meta content="http://schema.org/InStock" itemprop="availability">
<div class="clearfix"></div>
</div>
<meta content="EUR" itemprop="priceCurrency">
<meta content="30" itemprop="price">
I'm receiving the Error: "The property offers is not recognized by Google for an object of type Offer" (Only for div having class "price-box" ) in Structured data when testing this in Webmaster Tools.
I am also attaching a error snapshot of webmaster here.
Is anyone able to point me in the right direction of where I'm going wrong?
Thanks
I know this is an old question, but I wanted to respond in case someone else needs an answer. I am also going to make an assumption that the offer is for a product (this isn't required, but is probably very common for most people).
To begin, I want to refer to a few resources for reading about the subject.
https://schema.org/
Google Structured Data Test Tool
Google Product Reference
I also want to clarify that the question pertains to Microdata, not JSON-LD, so I will respond with Microdata formatting.
I believe your problem is that you have an "offers" within an "offers". Try this code:
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<div class="product-type-data">
<div class="price-box">
<span id="product-price-118" class="regular-price">
<span class="price">30,00 €</span>
</span>
</div>
<p class="availability in-stock">Verfügbarkeit: <span>Auf Lager</span></p>
<div class="clearfix"></div>
</div>
<meta content="http://schema.org/InStock" itemprop="availability">
<meta content="30" itemprop="price">
<meta content="EUR" itemprop="priceCurrency">
</div>
If you put the above code into the google testing tool, it will validate.
If you would like another example, go to the google product reference link above and in the examples section (Single product page), select the Microdata tab and then select "See Markup". This will give you a more complete example. I have included it below in case google ever removes this code.
<div itemtype="http://schema.org/Product" itemscope>
<meta itemprop="mpn" content="925872" />
<meta itemprop="name" content="Executive Anvil" />
<link itemprop="image" href="https://example.com/photos/16x9/photo.jpg" />
<link itemprop="image" href="https://example.com/photos/4x3/photo.jpg" />
<link itemprop="image" href="https://example.com/photos/1x1/photo.jpg" />
<meta itemprop="description" content="Sleeker than ACME's Classic Anvil, the Executive Anvil is perfect for the business traveler looking for something to drop from a height." />
<div itemprop="offers" itemtype="http://schema.org/Offer" itemscope>
<link itemprop="url" href="https://example.com/anvil" />
<meta itemprop="availability" content="https://schema.org/InStock" />
<meta itemprop="priceCurrency" content="USD" />
<meta itemprop="itemCondition" content="https://schema.org/UsedCondition" />
<meta itemprop="price" content="119.99" />
<meta itemprop="priceValidUntil" content="2020-11-05" />
<div itemprop="seller" itemtype="http://schema.org/Organization" itemscope>
<meta itemprop="name" content="Executive Objects" />
</div>
</div>
<div itemprop="aggregateRating" itemtype="http://schema.org/AggregateRating" itemscope>
<meta itemprop="reviewCount" content="89" />
<meta itemprop="ratingValue" content="4.4" />
</div>
<div itemprop="review" itemtype="http://schema.org/Review" itemscope>
<div itemprop="author" itemtype="http://schema.org/Person" itemscope>
<meta itemprop="name" content="Fred Benson" />
</div>
<div itemprop="reviewRating" itemtype="http://schema.org/Rating" itemscope>
<meta itemprop="ratingValue" content="4" />
<meta itemprop="bestRating" content="5" />
</div>
</div>
<meta itemprop="sku" content="0446310786" />
<div itemprop="brand" itemtype="http://schema.org/Thing" itemscope>
<meta itemprop="name" content="ACME" />
</div>
</div>
You can find examples of JSON+LD for Product type at https://schema.org/Product and for Offers https://schema.org/Offer but here's an example of:
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "Product",
"aggregateRating": {
"#type": "AggregateRating",
"bestRating": "100",
"ratingCount": "24",
"ratingValue": "87"
},
"image": "dell-30in-lcd.jpg",
"name": "Dell UltraSharp 30\" LCD Monitor",
"offers": {
"#type": "AggregateOffer",
"highPrice": "$1495",
"lowPrice": "$1250",
"offerCount": "8",
"offers": [
{
"#type": "Offer",
"url": "save-a-lot-monitors.com/dell-30.html"
},
{
"#type": "Offer",
"url": "jondoe-gadgets.com/dell-30.html"
}
]
}
}
</script>
Using assemble-swig, here is my template:
<!doctype html><html lang="it">
<head>
{% include "src/templates/partials/html_header.swig" %}
</head>
<body>
{% include "src/templates/partials/body_header.swig" %}
<header class="articleHeader intro"><div class="inner">
{% block articleheader %}{% endblock %}
</div></header>
<div class="body"><div class="inner">
<article class="main{% if nosidebar %} noSideBarArticle{% endif %}">
{% block content %}{% endblock %}
</article>
{% block sidebar %}{% endblock %}
</div></div>
{% include "src/templates/partials/body_footer.swig" %}
{% block javascript %}{% endblock %}
</body>
</html>
Here is my page:
---
title: "test"
---
{% block articleheader %}
<h1>Article Header!</h1>
{% endblock %}
{% block content %}
<p>this is the content!</p>
{% endblock %}
The result: No data from the page is show
(content of html_header and body_header goes here...)
<header class="articleHeader intro"><div class="inner">
</div></header>
<div class="body"><div class="inner">
<article class="main">
</article>
(content of html_header and body_footer goes here...)
Only if I use the tag {{body}} in the template all the content of the page is inserted but with no respect for the block tag.
Yes, it seems to be possible if you don't use the layout of Assemble.
I get it to work setting the layout property to false in the config:
assemble: {
options: {
engine: 'swig',
...
layout: false,
...
and then in each file adding:
{% extends 'src/layouts/default.swig' %}
at the top of the content.