• Resolved kamihicouki

    (@kamihicouki)


    # All of the English is translated from Japanese using Google Translate

    Hello, nice to meet you.
    I’d like to customize the display on WordPress about the oEmbed function.
    Specifically, it is as follows.

    # the purpose
    I want to change the card type tweet which is automatically displayed when Twitter link is inserted.
    Typically, the image is placed at the top and the text is placed at the bottom, but I want to place them in reverse.

    Supplement
    I would like to change the behavior or display of the standard Twitter link without using the WordPress short code function and tag function

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    You cannot directly vary the HTML returned through oEmbed links, it is managed by Twitter. You might try using flexbox CSS and the order property. You might be able to use jQuery or JavaScript to manipulate content. I am not confident that these ideas would work well. Accessing and manipulating iframe content is difficult at best and maybe impossible.

    BTW, Google did a good job with the translation. It seems to do better from certain languages, not so well from others 🙂

    Thread Starter kamihicouki

    (@kamihicouki)

    As you said, I attempted to change using JavaScript.
    However, I abandoned the choice because of the ghost called Shadow DOM. (I think Shadow DOM is a wonderful technology)

    Since I can not help it, I was able to get a free design by using the short code function to scrape the web.

    So I will terminate this thread.
    Thank you very much.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to customize oEmbed function’ is closed to new replies.