0

I'm using D7 and the Open Graph Meta Tag module to allow open graph meta tags to be set for various content types.

With the OG:summary field if not specified it falls back to the first 200 characters of the article body. Can anyone suggest how to change this fallback behaviour so that it instead uses a different field from the content_type as the fallback if not set?

Also is there a good way to hide some of the OG tags that are not going to be used? (location, type and contact sections specifically).

1

Also is there a good way to hide some of the OG tags that are not going to be used? (location, type and contact sections specifically).

You can use common css selector to do that:

.form-item-metatags-ru-og\:type-value,
.form-item-metatags-ru-og\:latitude-value,
.form-item-metatags-ru-og\:longitude-value,
.form-item-metatags-ru-og\:street-address-value,
.form-item-metatags-ru-og\:locality-value,
.form-item-metatags-ru-og\:region-value,
.form-item-metatags-ru-og\:postal-code-value,
.form-item-metatags-ru-og\:country-name-value,
.form-item-metatags-ru-og\:email-value,
.form-item-metatags-ru-og\:phone-number-value,
.form-item-metatags-ru-og\:fax-number-value {
  display:none;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.