{"id":4405,"date":"2021-09-09T18:45:53","date_gmt":"2021-09-09T17:45:53","guid":{"rendered":"https:\/\/wp-tutorials.tech\/?p=4405"},"modified":"2022-11-13T18:04:28","modified_gmt":"2022-11-13T18:04:28","slug":"full-width-hero-video-without-a-plugin","status":"publish","type":"post","link":"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/","title":{"rendered":"Full Width Hero Video Without a Plugin"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p>Adding a full width hero video banner to a website is a great way of grabbing a user&#8217;s attention. It&#8217;s a common misconception that you need an expensive slider plugin or specialist software to make it work. But you can add a video hero banner with just a few lines of PHP code in your theme&#8217;s functions.php file, and a bit of CSS to lay it out.<\/p>\n\n\n\n<p>In this tutorial, we&#8217;ll break down the problem and figure out how to solve it without having to add yet another plugin to our site.<\/p>\n\n\n\n<p>Before you start, make sure you&#8217;re using a <a href=\"https:\/\/wp-tutorials.tech\/getting-started-with-wordpress\/create-a-wordpress-child-theme\/\">custom child theme<\/a> so you can edit your functions.php file. You&#8217;ll also need to install the <a href=\"https:\/\/www.advancedcustomfields.com\/\">Advanced Custom Fields<\/a> (ACF) plugin, which is pretty-much a requirement for any WordPress project.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/peach.blender.org\/\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/bbb-splash-1024x576.jpg\" alt=\"Big Buck Bunny Film\" class=\"wp-image-4478\" srcset=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/bbb-splash-1024x576.jpg 1024w, https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/bbb-splash-300x169.jpg 300w, https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/bbb-splash-768x432.jpg 768w, https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/bbb-splash-1536x864.jpg 1536w, https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/bbb-splash.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Big Buck Bunny Film<\/figcaption><\/figure>\n<\/div><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-some-custom-fields\">Create Some Custom Fields<\/h2>\n\n\n\n<p>We&#8217;re going to use ACF to add three custom fields to our posts\/pages. In ACF&#8217;s &#8220;Custom Fields&#8221; area of your website, add a new Field Group called something like &#8220;Hero Fields&#8221; (you can call it anything you like). Then add three new fields with the following properties. Make sure the field names are correct, because we&#8217;re going to reference those from the PHP code.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">Label<\/th><th class=\"has-text-align-left\" data-align=\"left\">Name<\/th><th class=\"has-text-align-left\" data-align=\"left\">Type<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">Hero Video<\/td><td class=\"has-text-align-left\" data-align=\"left\">hero_video_url<\/td><td class=\"has-text-align-left\" data-align=\"left\">Url<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Call to Action Label<\/td><td class=\"has-text-align-left\" data-align=\"left\">call_to_action_label<\/td><td class=\"has-text-align-left\" data-align=\"left\">Text<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Call to Action URL<\/td><td class=\"has-text-align-left\" data-align=\"left\">call_to_action_url<\/td><td class=\"has-text-align-left\" data-align=\"left\">Text<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">ACF Fields for our video hero banner<\/figcaption><\/figure>\n\n\n\n<p>You&#8217;ll want to set the locations too&#8230; which types of content you want to be able to have hero banners. If you want it on the front page of your site, you&#8217;ll probably want to include &#8220;Post Type is equal to Page&#8221; in the locations.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/hero-video-acf-field-locations.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"641\" height=\"249\" src=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/hero-video-acf-field-locations.webp\" alt=\"Hero Video ACF Field Locations\" class=\"wp-image-4429\" srcset=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/hero-video-acf-field-locations.webp 641w, https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/hero-video-acf-field-locations-300x117.webp 300w\" sizes=\"auto, (max-width: 641px) 100vw, 641px\" \/><\/a><figcaption class=\"wp-element-caption\">Hero Video ACF Field Locations<\/figcaption><\/figure>\n<\/div>\n\n\n<p>Save the field group and check that it&#8217;s working&#8230; Edit any page\/post and you&#8217;ll see a meta box where you can set  the Hero Video URL, and the two Call-to-Action fields.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"analyse-the-page-layout\">Analyse the Page Layout<\/h2>\n\n\n\n<p>Before writing any code, we need to figure out how &amp; where we&#8217;re going to inject some HTML into the top of the page, and how we&#8217;re going to make this content &#8220;break out&#8221; of the centre column so it becomes full width.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"inject-the-banner-html\">Inject the Banner HTML<\/h3>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p>The HTML to create a video banner is really simple (it&#8217;s a <code data-enlighter-language=\"html\" class=\"EnlighterJSRAW\">&lt;div&gt;<\/code> with a <code data-enlighter-language=\"html\" class=\"EnlighterJSRAW\">&lt;video&gt;<\/code> element inside it). But&#8230; we need to figure out where on the page we want to render it. You could hook the <a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/the_content\/\">WordPress the_content filter<\/a> and prepend our HTML to the front of <code data-enlighter-language=\"php\" class=\"EnlighterJSRAW\">$content<\/code>. But that has the side-effect of injecting the hero banner inside your content&#8217;s <code data-enlighter-language=\"html\" class=\"EnlighterJSRAW\">&lt;article&gt;<\/code> element. That might work for some cases, but we want to inject it <strong>before<\/strong> the <code data-enlighter-language=\"html\" class=\"EnlighterJSRAW\">&lt;article&gt;<\/code> element.<\/p>\n\n\n\n<p>On this site, we&#8217;re using <a href=\"https:\/\/wpastra.com\/\">Astra<\/a>, which is easy to hook. The hook for <a href=\"https:\/\/www.kadencewp.com\/\">Kadence<\/a> is probably very similar, and you can try different action hooks until you find one that works for your parent theme.<\/p>\n\n\n\n<p>The hook we&#8217;re using is <strong>astra_template_parts_content_top<\/strong>, and all we need to do is use <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/add_action\/\">add_action()<\/a> to tell WordPress that whenever astra_template_parts_content_top is triggered, call our function so we can inject our HTML.<\/p>\n\n\n\n<p><span class=\"badge badge-info\">info<\/span>If you find a useful hook for your theme, let us know in the comments below \ud83d\udc47 \ud83d\udc47 \ud83d\udc47<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\"><div data-aos=\"fade-up\" data-aos-offset=\"120\" data-aos-duration=\"400\" data-aos-easing=\"ease\" data-aos-anchor-placement=\"top-bottom\">\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/Main-and-Article-Elements.png\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/Main-and-Article-Elements.png\" alt=\"Insert HTML before the article element\" class=\"wp-image-4482\" srcset=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/Main-and-Article-Elements.png 640w, https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/Main-and-Article-Elements-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption class=\"wp-element-caption\">Inject HTML with an action hook<\/figcaption><\/figure>\n<\/div>\n\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"break-out-of-the-centre-column\">Break Out of the Centre Column<\/h3>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p>If you create a block element in HTML and set its width to 100%, it&#8217;ll be as wide as its parent element.<\/p>\n\n\n\n<p>If you&#8217;ve got some content on a site that sits in a centre column, and you want to add a block that &#8220;breaks out&#8221; of this centre column to go full width, you need to fiddle the margins and set the <code data-enlighter-language=\"css\" class=\"EnlighterJSRAW\">width<\/code> and <code data-enlighter-language=\"css\" class=\"EnlighterJSRAW\">max-width<\/code> properties to the browser&#8217;s view port width, like this&#8230;<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"css\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">.hero-banner {\n    \/* Break out of the centre column *\/\n    margin-left: calc(-50vw + 50%);\n    margin-right: calc(-50vw + 50%);\n    max-width: 100vw;\n    width: 100vw;\n}<\/pre>\n\n\n\n<p><span class=\"badge badge-info\">tip<\/span>This is a handy little block of CSS to keep in your toolkit. Add it to any class definition and it&#8217;ll make that block element become the full width of the browser&#8217;s view port.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\"><div data-aos=\"fade-up\" data-aos-offset=\"120\" data-aos-duration=\"400\" data-aos-easing=\"ease\" data-aos-anchor-placement=\"top-bottom\">\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/Full-Width-from-Center-Column-2.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/Full-Width-from-Center-Column-2.jpg\" alt=\"Make a div element the full width of the browser\" class=\"wp-image-4502\" srcset=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/Full-Width-from-Center-Column-2.jpg 640w, https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/Full-Width-from-Center-Column-2-300x225.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption class=\"wp-element-caption\">&#8220;Break Out&#8221; of the centre column<\/figcaption><\/figure>\n<\/div>\n\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"add-some-video\">Add Some Video<\/h2>\n\n\n\n<p>We need to attach a video file to some content, using our new ACF fields. Easy stuff&#8230; Go to the page\/post you want to add the video to, and you&#8217;ll see the custom fields, like this:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/custom-fields-for-hero-video.png\"><img loading=\"lazy\" decoding=\"async\" width=\"689\" height=\"319\" src=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/custom-fields-for-hero-video.png\" alt=\"Hero video custom post fields\" class=\"wp-image-4454\" srcset=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/custom-fields-for-hero-video.png 689w, https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/custom-fields-for-hero-video-300x139.png 300w\" sizes=\"auto, (max-width: 689px) 100vw, 689px\" \/><\/a><figcaption class=\"wp-element-caption\">Full Width Hero Video : Big Buck Bunny<\/figcaption><\/figure>\n<\/div>\n\n\n<p>It&#8217;s definitely best to self-host the video, like we&#8217;re doing here. But you can host the video file elsewhere if you&#8217;re worried about tripping your site&#8217;s bandwidth allowance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"let-s-write-some-code\">Let&#8217;s Write Some Code<\/h2>\n\n\n\n<p>In your custom child theme, create a folder called <strong>wpt-hero-banner<\/strong>. Go into this new folder and create a file called <strong>wpt-hero-banner.css<\/strong>. Next, go back up to your child theme&#8217;s main folder and create a file called <strong>wpt-hero-banner.php<\/strong>. Your custom child theme&#8217;s files should now look something like this:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>functions.php<\/li>\n\n\n\n<li>&#8230;<\/li>\n\n\n\n<li>style.css<\/li>\n\n\n\n<li>&#8230;<\/li>\n\n\n\n<li>wpt-hero-banner\n<ul class=\"wp-block-list\">\n<li>wpt-hero-banner.css<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>wpt-hero-banner.php<\/li>\n<\/ul>\n\n\n\n<p>Paste the following code into <strong>wpt-hero-banner.php<\/strong> and save it.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n\n\/**\n * WP Tutorials Full Width Hero Banner\n *\n * https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/\n *\n *\/\n\n\/\/ Block direct access.\ndefined('WPINC') || die();\n\nconst WPT_META_HERO_VIDEO_URL = 'hero_video_url';\nconst WPT_META_HERO_CTA_LABEL = 'call_to_action_label';\nconst WPT_META_HERO_CTA_URL = 'call_to_action_url';\n\nfunction wpt_insert_hero_banner($html) {\n\t$post_id = get_the_id();\n\n\tif (is_admin() || wp_doing_ajax()) {\n\t\t\/\/ ...\n\t} elseif (!is_single()) {\n\t\t\/\/ ...\n\t} elseif (empty($video_url = get_post_meta($post_id, WPT_META_HERO_VIDEO_URL, true))) {\n\t\t\/\/ ...\n\t} else {\n\t\t\/\/ If we haven't already enqueued our CSS file, enqueue it now.\n\t\tglobal $has_hero_css_been_enqueued;\n\t\tif (is_null($has_hero_css_been_enqueued)) {\n\t\t\t$base_url = get_stylesheet_directory_uri() . '\/wpt-hero-banner\/';\n\t\t\t$version = wp_get_theme()->get('Version');\n\n\t\t\twp_enqueue_style('wpt-hero-banner', $base_url . 'wpt-hero-banner.css', null, $version);\n\t\t\t$has_hero_css_been_enqueued = true;\n\t\t}\n\n\t\t\/\/ Set the variables we're about to work with.\n\t\t$title = get_the_title();\n\t\t$cta_label = get_post_meta($post_id, WPT_META_HERO_CTA_LABEL, true);\n\t\t$cta_url = get_post_meta($post_id, WPT_META_HERO_CTA_URL, true);\n\n\t\t\/\/ Render the video hero banner HTML.\n\t\techo '&lt;div class=\"hero-banner\">';\n\t\tprintf(\n\t\t\t'&lt;video src=\"%s\" autoplay loop muted>&lt;\/video>',\n\t\t\tesc_url($video_url)\n\t\t);\n\t\techo '&lt;div class=\"hero-overlay\">';\n\t\tprintf('&lt;h1>%s&lt;\/h1>', esc_html($title));\n\t\tif (!empty($cta_label) &amp;&amp; !empty($cta_url)) {\n\t\t\tprintf(\n\t\t\t\t'&lt;a class=\"hero-cta button\" href=\"%s\">%s&lt;\/a>',\n\t\t\t\tesc_url($cta_url),\n\t\t\t\tesc_html($cta_label),\n\t\t\t);\n\t\t}\n\t\techo '&lt;\/div>'; \/\/ .hero-overlay\n\t\techo '&lt;\/div>'; \/\/ .hero-banner\n\t}\n}\n\n\/**\n * If you don't use Astra as your parent theme, you will want to replace\n * astra_template_parts_content_top with something that works better for\n * your theme.\n *\/\nadd_filter('astra_template_parts_content_top', 'wpt_insert_hero_banner');<\/pre>\n\n\n\n<p>Next, edit your child theme&#8217;s <strong>functions.php<\/strong> file, add the following couple of lines and save the file.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ WP Tutorials Full Width Hero Video\nrequire_once dirname( __FILE__ ) . '\/wpt-hero-banner.php';<\/pre>\n\n\n\n<p>That should get you up and running. If you go to the post\/page with your video content, you should see the video at the top of the page, looking a bit out-of-place&#8230; but working. Now we just need to add the CSS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"add-the-styles\">Add the Styles<\/h3>\n\n\n\n<p>Edit <strong>wpt-hero-banner\/wpt-hero-banner.css<\/strong> and paste the following into it.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"css\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/**\n * Headwall WP Tutorials Hero Banner\n *\/\n.hero-banner {\n    \/* Break out of the centre column *\/\n    margin-left: calc(-50vw + 50%);\n    margin-right: calc(-50vw + 50%);\n    max-width: 100vw;\n    width: 100vw;\n\n    position: relative;\n    height: 15em;\n    margin-bottom: 2em;\n    border-bottom: 1px solid #44444444;\n}\n\n.hero-banner video {\n    width: 100%;\n    height: 100%;\n    object-fit: cover;\n}\n\n.hero-overlay {\n    position: absolute;\n    left: 0;\n    top: 50%;\n    width: 100%;\n    transform: translateY(-50%);\n    text-align: center;\n}\n\n.hero-overlay h1 {\n    text-align: center;\n    padding: 0 1em;\n    line-height: 1.5em;\n    color: white;\n    text-shadow: 0 0 3px black, 0 0 2px black, 0 0 2px black, 0 0 2px black;\n}\n\n\/* Call to Action button *\/\n.hero-overlay .hero-cta {\n    margin-top: 1em;\n    display: inline-block;\n    padding: 1em 2em;\n    border-radius: 0.5em;\n    font-weight: bold;\n}\n\n.hero-overlay .hero-cta::after {\n    font-family: 'Font Awesome 5 Free';\n    font-weight: 900;\n    content: 'f138';\n    margin-left: 1em;\n}\n\n\/* Responsive sizes. *\/\n@media(min-width: 576px) {\n    .hero-banner {\n        height: 18em;\n    }\n}\n\n@media(min-width: 960px) {\n    .hero-banner {\n        height: 22em;\n    }\n}\n\n@media(min-width: 1280px) {\n    .hero-banner {\n        height: 26em;\n    }\n}<\/pre>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p>You can see the chunk that gives us the full-width effect near the top, in the <code data-enlighter-language=\"css\" class=\"EnlighterJSRAW\">hero-banner<\/code> class.<\/p>\n\n\n\n<p>Save and then view your content. Hopefully it&#8217;s all come together nicely.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"notes-for-astra-parent-theme\">Notes for Astra (Parent) Theme<\/h3>\n\n\n\n<p>Astra has some nice per-page\/post options that let us disable some theme components. To make the video sit nicely at the top of the page, we&#8217;ve disabled the page title, featured image and the nav headers&#8230; so they don&#8217;t get in the way.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"266\" height=\"257\" src=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/astra-post-theme-options-disable-title.jpg\" alt=\"Astra per-page theme options.\" class=\"wp-image-4509\"\/><figcaption class=\"wp-element-caption\">Astra Theme Options (for Posts)<\/figcaption><\/figure>\n<\/div><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"breakdown-the-php-code\">Breakdown the PHP Code<\/h2>\n\n\n\n<p>The PHP code should be easy to follow. At the point where WordPress is asked to process the <strong>astra_template_parts_content_top<\/strong> action (or whatever action hook you&#8217;ve used), our function gets called. We use the standard WordPress function <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/get_post_meta\/\">get_post_meta()<\/a> to get a post&#8217;s ACF field values (which are really WordPress &#8220;post meta&#8221;).<\/p>\n\n\n\n<p>The code&#8217;s logic works like this&#8230;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Run some checks to make sure we don&#8217;t do anything to the content if we&#8217;re not explicitly looking at a single page in the frontend.<\/li>\n\n\n\n<li>Don&#8217;t do anything if the <strong>hero_video_url<\/strong> custom field is empty.<\/li>\n\n\n\n<li>Enqueue our <strong>wpt-hero-banner.css<\/strong> stylesheet.<\/li>\n\n\n\n<li>Set the <code data-enlighter-language=\"php\" class=\"EnlighterJSRAW\">$title<\/code> variable from the current post&#8217;s title.<\/li>\n\n\n\n<li>Grab the call-to-action (CTA) label and URL from the custom fields &#8211; these might be empty.<\/li>\n\n\n\n<li>Open the main <code data-enlighter-language=\"html\" class=\"EnlighterJSRAW\">&lt;div&gt;<\/code> with <code data-enlighter-language=\"html\" class=\"EnlighterJSRAW\">class=\"hero-banner\"<\/code>.<\/li>\n\n\n\n<li>Render the <code data-enlighter-language=\"html\" class=\"EnlighterJSRAW\">&lt;video&gt;<\/code> element.<\/li>\n\n\n\n<li>Open the <code data-enlighter-language=\"html\" class=\"EnlighterJSRAW\">&lt;div&gt;<\/code> for the overlay layer.<\/li>\n\n\n\n<li>Render the overlay H1 title.<\/li>\n\n\n\n<li>If the CTA label and URL are both set, then&#8230;\n<ul class=\"wp-block-list\">\n<li>Render the CTA as an <code data-enlighter-language=\"html\" class=\"EnlighterJSRAW\">&lt;a&gt;<\/code> element.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Close the overlay layer <code data-enlighter-language=\"html\" class=\"EnlighterJSRAW\">&lt;div&gt;<\/code>.<\/li>\n\n\n\n<li>Close the main <code data-enlighter-language=\"html\" class=\"EnlighterJSRAW\">&lt;div&gt;<\/code>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"that-s-all-folks\">That&#8217;s All Folks!<\/h2>\n\n\n\n<p>Once you&#8217;ve got your <code data-enlighter-language=\"html\" class=\"EnlighterJSRAW\">&lt;div class=\"hero-banner\"&gt;...&lt;\/div&gt;<\/code> injected into your page, you can put anything you like in there &#8211;  not just video. You could put a <a href=\"https:\/\/wp-tutorials.tech\/add-functionality\/responsive-post-product-scrolling-carousel\/\">post carousel<\/a>, plain images, etc&#8230; Have fun with it \ud83d\ude0e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to easily create a full-width video hero banner on your WordPress website. No plugin required. Copy-and-paste tutorial.<\/p>\n","protected":false},"author":1,"featured_media":4493,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"iawp_total_views":364,"footnotes":""},"categories":[36],"tags":[34,32],"class_list":["post-4405","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-add-functionality","tag-acf","tag-theme","masonry-post","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33","no-featured-image-padding"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Full Width Hero Video Without a Plugin - Headwall WP Tutorials<\/title>\n<meta name=\"description\" content=\"Learn how to easily create a full-width video hero banner on your WordPress website. No plugin required. Copy-and-paste tutorial.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Full Width Hero Video Without a Plugin - Headwall WP Tutorials\" \/>\n<meta property=\"og:description\" content=\"Learn how to easily create a full-width video hero banner on your WordPress website. No plugin required. Copy-and-paste tutorial.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/\" \/>\n<meta property=\"og:site_name\" content=\"Headwall WP Tutorials\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/headwallhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-09T17:45:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-13T18:04:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/Full-Width-Video-Tutorial-2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"headwall\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@headwall\" \/>\n<meta name=\"twitter:site\" content=\"@HeadwallHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"headwall\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/add-functionality\\\/full-width-hero-video-without-a-plugin\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/add-functionality\\\/full-width-hero-video-without-a-plugin\\\/\"},\"author\":{\"name\":\"headwall\",\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/#\\\/schema\\\/person\\\/567442e9250f58ba41a61bbfc1411622\"},\"headline\":\"Full Width Hero Video Without a Plugin\",\"datePublished\":\"2021-09-09T17:45:53+00:00\",\"dateModified\":\"2022-11-13T18:04:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/add-functionality\\\/full-width-hero-video-without-a-plugin\\\/\"},\"wordCount\":1250,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/add-functionality\\\/full-width-hero-video-without-a-plugin\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wp-tutorials.tech\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/Full-Width-Video-Tutorial-2.jpg\",\"keywords\":[\"ACF\",\"theme\"],\"articleSection\":[\"Extend WordPress\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wp-tutorials.tech\\\/add-functionality\\\/full-width-hero-video-without-a-plugin\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/add-functionality\\\/full-width-hero-video-without-a-plugin\\\/\",\"url\":\"https:\\\/\\\/wp-tutorials.tech\\\/add-functionality\\\/full-width-hero-video-without-a-plugin\\\/\",\"name\":\"Full Width Hero Video Without a Plugin - Headwall WP Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/add-functionality\\\/full-width-hero-video-without-a-plugin\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/add-functionality\\\/full-width-hero-video-without-a-plugin\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wp-tutorials.tech\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/Full-Width-Video-Tutorial-2.jpg\",\"datePublished\":\"2021-09-09T17:45:53+00:00\",\"dateModified\":\"2022-11-13T18:04:28+00:00\",\"description\":\"Learn how to easily create a full-width video hero banner on your WordPress website. No plugin required. Copy-and-paste tutorial.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/add-functionality\\\/full-width-hero-video-without-a-plugin\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wp-tutorials.tech\\\/add-functionality\\\/full-width-hero-video-without-a-plugin\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/add-functionality\\\/full-width-hero-video-without-a-plugin\\\/#primaryimage\",\"url\":\"https:\\\/\\\/wp-tutorials.tech\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/Full-Width-Video-Tutorial-2.jpg\",\"contentUrl\":\"https:\\\/\\\/wp-tutorials.tech\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/Full-Width-Video-Tutorial-2.jpg\",\"width\":1280,\"height\":1024,\"caption\":\"Full width video hero banner\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/add-functionality\\\/full-width-hero-video-without-a-plugin\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wp-tutorials.tech\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Extend WordPress\",\"item\":\"https:\\\/\\\/wp-tutorials.tech\\\/category\\\/add-functionality\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Full Width Hero Video Without a Plugin\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/#website\",\"url\":\"https:\\\/\\\/wp-tutorials.tech\\\/\",\"name\":\"Headwall WP Tutorials\",\"description\":\"Practical WordPress Tutorials\",\"publisher\":{\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wp-tutorials.tech\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/#organization\",\"name\":\"Headwall WordPress Tutorials\",\"url\":\"https:\\\/\\\/wp-tutorials.tech\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/wp-tutorials.tech\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/headwall-wp-tutorials-logo-retina.png\",\"contentUrl\":\"https:\\\/\\\/wp-tutorials.tech\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/headwall-wp-tutorials-logo-retina.png\",\"width\":1640,\"height\":512,\"caption\":\"Headwall WordPress Tutorials\"},\"image\":{\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/headwallhosting\\\/\",\"https:\\\/\\\/x.com\\\/HeadwallHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wp-tutorials.tech\\\/#\\\/schema\\\/person\\\/567442e9250f58ba41a61bbfc1411622\",\"name\":\"headwall\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6106bc5e3abccd66f196d133fa692d0c6c53cc2cac1b58528c510ee8de9e791e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6106bc5e3abccd66f196d133fa692d0c6c53cc2cac1b58528c510ee8de9e791e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6106bc5e3abccd66f196d133fa692d0c6c53cc2cac1b58528c510ee8de9e791e?s=96&d=mm&r=g\",\"caption\":\"headwall\"},\"sameAs\":[\"https:\\\/\\\/headwall-hosting.com\\\/\",\"https:\\\/\\\/x.com\\\/headwall\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Full Width Hero Video Without a Plugin - Headwall WP Tutorials","description":"Learn how to easily create a full-width video hero banner on your WordPress website. No plugin required. Copy-and-paste tutorial.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/","og_locale":"en_GB","og_type":"article","og_title":"Full Width Hero Video Without a Plugin - Headwall WP Tutorials","og_description":"Learn how to easily create a full-width video hero banner on your WordPress website. No plugin required. Copy-and-paste tutorial.","og_url":"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/","og_site_name":"Headwall WP Tutorials","article_publisher":"https:\/\/www.facebook.com\/headwallhosting\/","article_published_time":"2021-09-09T17:45:53+00:00","article_modified_time":"2022-11-13T18:04:28+00:00","og_image":[{"width":1280,"height":1024,"url":"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/Full-Width-Video-Tutorial-2.jpg","type":"image\/jpeg"}],"author":"headwall","twitter_card":"summary_large_image","twitter_creator":"@headwall","twitter_site":"@HeadwallHosting","twitter_misc":{"Written by":"headwall","Estimated reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/#article","isPartOf":{"@id":"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/"},"author":{"name":"headwall","@id":"https:\/\/wp-tutorials.tech\/#\/schema\/person\/567442e9250f58ba41a61bbfc1411622"},"headline":"Full Width Hero Video Without a Plugin","datePublished":"2021-09-09T17:45:53+00:00","dateModified":"2022-11-13T18:04:28+00:00","mainEntityOfPage":{"@id":"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/"},"wordCount":1250,"commentCount":0,"publisher":{"@id":"https:\/\/wp-tutorials.tech\/#organization"},"image":{"@id":"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/#primaryimage"},"thumbnailUrl":"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/Full-Width-Video-Tutorial-2.jpg","keywords":["ACF","theme"],"articleSection":["Extend WordPress"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/","url":"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/","name":"Full Width Hero Video Without a Plugin - Headwall WP Tutorials","isPartOf":{"@id":"https:\/\/wp-tutorials.tech\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/#primaryimage"},"image":{"@id":"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/#primaryimage"},"thumbnailUrl":"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/Full-Width-Video-Tutorial-2.jpg","datePublished":"2021-09-09T17:45:53+00:00","dateModified":"2022-11-13T18:04:28+00:00","description":"Learn how to easily create a full-width video hero banner on your WordPress website. No plugin required. Copy-and-paste tutorial.","breadcrumb":{"@id":"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/#primaryimage","url":"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/Full-Width-Video-Tutorial-2.jpg","contentUrl":"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/09\/Full-Width-Video-Tutorial-2.jpg","width":1280,"height":1024,"caption":"Full width video hero banner"},{"@type":"BreadcrumbList","@id":"https:\/\/wp-tutorials.tech\/add-functionality\/full-width-hero-video-without-a-plugin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wp-tutorials.tech\/"},{"@type":"ListItem","position":2,"name":"Extend WordPress","item":"https:\/\/wp-tutorials.tech\/category\/add-functionality\/"},{"@type":"ListItem","position":3,"name":"Full Width Hero Video Without a Plugin"}]},{"@type":"WebSite","@id":"https:\/\/wp-tutorials.tech\/#website","url":"https:\/\/wp-tutorials.tech\/","name":"Headwall WP Tutorials","description":"Practical WordPress Tutorials","publisher":{"@id":"https:\/\/wp-tutorials.tech\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wp-tutorials.tech\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/wp-tutorials.tech\/#organization","name":"Headwall WordPress Tutorials","url":"https:\/\/wp-tutorials.tech\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/wp-tutorials.tech\/#\/schema\/logo\/image\/","url":"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/12\/headwall-wp-tutorials-logo-retina.png","contentUrl":"https:\/\/wp-tutorials.tech\/wp-content\/uploads\/2021\/12\/headwall-wp-tutorials-logo-retina.png","width":1640,"height":512,"caption":"Headwall WordPress Tutorials"},"image":{"@id":"https:\/\/wp-tutorials.tech\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/headwallhosting\/","https:\/\/x.com\/HeadwallHosting"]},{"@type":"Person","@id":"https:\/\/wp-tutorials.tech\/#\/schema\/person\/567442e9250f58ba41a61bbfc1411622","name":"headwall","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/6106bc5e3abccd66f196d133fa692d0c6c53cc2cac1b58528c510ee8de9e791e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6106bc5e3abccd66f196d133fa692d0c6c53cc2cac1b58528c510ee8de9e791e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6106bc5e3abccd66f196d133fa692d0c6c53cc2cac1b58528c510ee8de9e791e?s=96&d=mm&r=g","caption":"headwall"},"sameAs":["https:\/\/headwall-hosting.com\/","https:\/\/x.com\/headwall"]}]}},"_links":{"self":[{"href":"https:\/\/wp-tutorials.tech\/wp-json\/wp\/v2\/posts\/4405","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp-tutorials.tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp-tutorials.tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp-tutorials.tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp-tutorials.tech\/wp-json\/wp\/v2\/comments?post=4405"}],"version-history":[{"count":0,"href":"https:\/\/wp-tutorials.tech\/wp-json\/wp\/v2\/posts\/4405\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wp-tutorials.tech\/wp-json\/wp\/v2\/media\/4493"}],"wp:attachment":[{"href":"https:\/\/wp-tutorials.tech\/wp-json\/wp\/v2\/media?parent=4405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp-tutorials.tech\/wp-json\/wp\/v2\/categories?post=4405"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp-tutorials.tech\/wp-json\/wp\/v2\/tags?post=4405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}