• Ever since I updated to WordPress 5.6 I can’t embed my video player so I restored to an iframe which isn’t good and very unwelcomed.

    I have included a link to the issue seen here

    The page I need help with: [log in to see the link]

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

    (@bcworkz)

    You appear to be trying to place <link> tags into a custom HTML block. That’s not really allowed even if you got away with it earlier. <link> tags belong in the page’s <head> section. To get them there, the referenced files should be enqueued with wp_enqueue_style() with code added to functions.php. While you’re at it, the <script> tags aren’t reliable in HTML blocks either, though technically allowed per HTML standards. It’d be better if the referenced files were also enqueued, this time with wp_enqueue_script()

    Thread Starter ikhnetworks

    (@ikhnetworks)

    Where and how to edit this file.

    Moderator bcworkz

    (@bcworkz)

    https://developer.www.ads-software.com/reference/functions/wp_enqueue_style/
    In particular, review the More Information > Notes section here:
    https://developer.www.ads-software.com/reference/functions/wp_enqueue_script/
    There are useful examples in the user notes sections near the end of each page.

    The code can go in functions.php of your theme, or in a custom plugin. Instead of altering your theme, it’s better to create a child theme. TBH, if you will not be modifying any templates, a custom plugin is easier to create.

    To create a child or plugin, you need FTP or your hosting file manager because new files need to be uploaded. You can edit your existing theme with the theme editor. It’s recommended you switch to a different theme before changing anything in your normal theme. If there are any errors in the changes, the theme will not reactivate. Errors made in an active theme could lock you out of WP, requiring FTP to go in and fix the errant code.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can’t Embed Custom Code’ is closed to new replies.