• I cant integrate youtube links and images in the text.

    No rules defined for <div class=”wp-caption aligncenter”> in the context of InstantArticle

    where do i have to define this rules?
    in every article? do i really have to wrap any item in tons of code?

    same in videos.
    No rules defined for <div class=”flex-video flex-video-youtube”> in the context of InstantArticle
    Invalid selector for fields (image.url). The node being transformed was <p> in the context of InstantArticle within the Rule ImageRule with these properties: { image.url=StringGetter}

    i have absolutely no idea what this plugi does.

    https://wordpress.org/plugins/fb-instant-articles/

Viewing 1 replies (of 1 total)
  • Hey soundforscher so it’s asking you to write custom Transformer Rules. A bit odd, I know. If you go to the settings page of the Instant Articles plugin and go down to the bottom you’ll see an empty checkbox that reads something like, “Allow custom transformer rules” and if you check that box you can then start writing custom transformer rules in that textarea that pops up. I can’t say for sure but I’ll be that some transformer rules like this would do the trick:

    {
        "rules":
        [
            {
                "class": "ImageRule",
                "selector" : "div.wp-caption",
                "properties" : {
                    "image.url" : {
                        "type" : "string",
                        "selector" : "img",
                        "attribute": "src"
                    },
                   "image.caption" : {
                        "type" : "element",
                        "selector" : "p.caption"
                    },
                }
            },
            {
                "class": "InteractiveRule",
                "selector" : "div.flex-video-youtube",
                "properties" : {
                    "interactive.iframe" : {
                        "type" : "string",
                        "selector" : "iframe",
                        "attribute": "src"
                    }
                }
            },
        ]
    }

    For more info see: https://developers.facebook.com/docs/instant-articles/sdk/

Viewing 1 replies (of 1 total)
  • The topic ‘Images and Youtube’ is closed to new replies.