{"id":71533,"date":"2017-01-13T15:17:13","date_gmt":"2017-01-13T15:17:13","guid":{"rendered":"http:\/\/webkul.com\/blog\/?p=71533"},"modified":"2024-02-21T06:42:37","modified_gmt":"2024-02-21T06:42:37","slug":"include-use-custom-js-file-require-js-magento2","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/","title":{"rendered":"How to Use Require JS in Magento 2"},"content":{"rendered":"\n<p>In this article, we will learn about RequireJS in Magento 2. But what is require js and how to use it in default, for this you can check out our blog: What is <a href=\"https:\/\/webkul.com\/blog\/what-is-requirejs-and-how-to-use-it\/\">RequireJs<\/a><\/p>\n\n\n\n<p>Now to explain it in Magento 2, I am taking an example.<\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>How to add a Custom JS file in Require js file<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\">To add a js file in your Magento 2 custom module, you need to add &#8220;requirejs-config.js&#8221; file in your module at path &#8220;app\/code\/Webkul\/Test\/view\/frontend&#8221;.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">var config = {\n    map: {\n        &#039;*&#039;: {\n            wktestrequire: &#039;Webkul_Test\/js\/wkrequirejs&#039;,\n        }\n    }\n};<\/pre>\n\n\n\n<p>In this :<br>by the <strong>map<\/strong>, it maps your file with the alias name which you defined in the object.<br>&#8216;*&#8217; used to define that you are using a new module to use require js, if you want to add it to the existing one then you need to write the module name.<br>&#8216;<strong>wktestrequire<\/strong>&#8216; is an alias name to alias your file.<br>&#8216;<strong>Webkul_Test\/js\/wkrequirejs<\/strong>&#8216; is your file path with the file name which is present at path:<br>&#8220;app\/code\/Webkul\/Test\/view\/frontend\/web\/js\/wkrequirejs.js&#8221;<\/p>\n\n\n\n<p>extension of the file is not needed, it takes js as a default type.<\/p>\n\n\n\n<p>By this file it adds your require js content in file:<br>&#8220;pub\/static\/_requirejs\/frontend\/Magento\/luma\/en_US\/requirejs-config.js&#8221;<\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>How to call and use the file:<\/strong><\/p>\n\n\n\n<p>Now we call the above file in our .phtml file to perform some operations.<br>I create a file at path:<br>&#8220;app\/code\/Webkul\/Test\/view\/frontend\/templates\/test.phtml&#8221;<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;div id=&quot;testdiv&quot;&gt;\n\t&lt;a&gt;Test anchor tag&lt;\/a&gt;\n&lt;\/div&gt;\n\n&lt;?php\n$formData = &#091;\n    &#039;divElement&#039;       =&gt;  &#039;#testdiv&#039;,\n];\n$serializedFormData = $this-&gt;helper(&#039;Magento\\Framework\\Json\\Helper\\Data&#039;)-&gt;jsonEncode($formData);\n?&gt;\n&lt;script type=&quot;text\/x-magento-init&quot;&gt;\n    {\n        &quot;*&quot;: {\n            &quot;wktestrequire&quot;: &lt;?php \/* @noEscape *\/ echo $serializedFormData; ?&gt;\n        }\n    }\n&lt;\/script&gt;<\/pre>\n\n\n\n<p>In this code, i took a <strong>div element<\/strong>, and in the formData array, i define that element&#8217;s id with &#8220;devElement&#8221;.<br>and then i encoded that data to send the data in serialized format.<br>Now, i took a script tag, in this i used same alias name which i used in my &#8220;requirejs-config.js&#8221; file and passes my serialized data with that js alias name.<\/p>\n\n\n\n<p>Now, whenever this code gets executed then, it reads the <strong>&#8220;wktestrequire&#8221;<\/strong> under<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>How to use data passed in when calling requirejs in .phtml file:<\/strong><\/p>\n\n\n\n<p>Now I created a file with name &#8220;wkrequirejs.js&#8221; at:<br>&#8220;app\/code\/Webkul\/Test\/view\/frontend\/web\/js&#8221;<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">define(&#091;\n    &quot;jquery&quot;,\n    &#039;Magento_Ui\/js\/modal\/alert&#039;,\n    &quot;jquery\/ui&quot;,\n], function ($, alert) {\n    &#039;use strict&#039;;\n    $.widget(&#039;mage.wktestrequire&#039;, {\n        options: {\n            confirmMsg: (&#039;divElement is removed.&#039;)\n        },\n        _create: function () {\n            var self = this;\n            $(self.options.divElement).remove();\n            alert({\n                content: self.options.confirmMsg\n            });\n        }\n    });\n    return $.mage.wktestrequire;\n});<\/pre>\n\n\n\n<p>Here,<\/p>\n\n\n\n<p>In define, I includes some magento js files and alias them in function parameter.<\/p>\n\n\n\n<p><strong>&#8220;options&#8221;<\/strong>, is an object in which we can define the variable, which will be in use in this file.<br><strong>_create<\/strong> function is executed when this file get executed.<br>You can access the parameters that are pass in .phtml and the options which are defined in the js file by using <strong>&#8220;self.options.&#8221;<\/strong>.<\/p>\n\n\n\n<p>And now the div element is clear from your page.<\/p>\n\n\n\n<p>I hope, the RequireJS Magento 2 blog will help you to use the js and require js files in Magento 2. For more information or queries, please <a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\">create a ticket<\/a> or <a href=\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/support@webkul.com\">send an email<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will learn about RequireJS in Magento 2. But what is require js and how to use it in default, for this you can check out our blog: What is RequireJs Now to explain it in Magento 2, I am taking an example. How to add a Custom JS file in Require <a href=\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":68,"featured_media":70648,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[302],"tags":[2070,4190],"class_list":["post-71533","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento2","tag-magento2","tag-requirejs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Use Require JS in Magento 2<\/title>\n<meta name=\"description\" content=\"In this dev doc article, we will learn about how to use RequireJS in Magento 2 e-commerce platform with a few simple steps.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use Require JS in Magento 2\" \/>\n<meta property=\"og:description\" content=\"In this dev doc article, we will learn about how to use RequireJS in Magento 2 e-commerce platform with a few simple steps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-13T15:17:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-21T06:42:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Bulbul\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bulbul\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/\"},\"author\":{\"name\":\"Bulbul\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/c9c6288b3950490ffdb37cb2a526996e\"},\"headline\":\"How to Use Require JS in Magento 2\",\"datePublished\":\"2017-01-13T15:17:13+00:00\",\"dateModified\":\"2024-02-21T06:42:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/\"},\"wordCount\":465,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png\",\"keywords\":[\"Magento2\",\"RequireJs\"],\"articleSection\":[\"Magento2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/\",\"url\":\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/\",\"name\":\"How to Use Require JS in Magento 2\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png\",\"datePublished\":\"2017-01-13T15:17:13+00:00\",\"dateModified\":\"2024-02-21T06:42:37+00:00\",\"description\":\"In this dev doc article, we will learn about how to use RequireJS in Magento 2 e-commerce platform with a few simple steps.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use Require JS in Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/c9c6288b3950490ffdb37cb2a526996e\",\"name\":\"Bulbul\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/37ea7175f5ae6557d01bb38e147f6a02a540714ecdb71770d8ec554d4d34c23f?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/37ea7175f5ae6557d01bb38e147f6a02a540714ecdb71770d8ec554d4d34c23f?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"caption\":\"Bulbul\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/bulbul896\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Use Require JS in Magento 2","description":"In this dev doc article, we will learn about how to use RequireJS in Magento 2 e-commerce platform with a few simple steps.","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:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/","og_locale":"en_US","og_type":"article","og_title":"How to Use Require JS in Magento 2","og_description":"In this dev doc article, we will learn about how to use RequireJS in Magento 2 e-commerce platform with a few simple steps.","og_url":"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2017-01-13T15:17:13+00:00","article_modified_time":"2024-02-21T06:42:37+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png","type":"image\/png"}],"author":"Bulbul","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Bulbul","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/"},"author":{"name":"Bulbul","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/c9c6288b3950490ffdb37cb2a526996e"},"headline":"How to Use Require JS in Magento 2","datePublished":"2017-01-13T15:17:13+00:00","dateModified":"2024-02-21T06:42:37+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/"},"wordCount":465,"commentCount":2,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png","keywords":["Magento2","RequireJs"],"articleSection":["Magento2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/","url":"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/","name":"How to Use Require JS in Magento 2","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png","datePublished":"2017-01-13T15:17:13+00:00","dateModified":"2024-02-21T06:42:37+00:00","description":"In this dev doc article, we will learn about how to use RequireJS in Magento 2 e-commerce platform with a few simple steps.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/include-use-custom-js-file-require-js-magento2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Use Require JS in Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/c9c6288b3950490ffdb37cb2a526996e","name":"Bulbul","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/37ea7175f5ae6557d01bb38e147f6a02a540714ecdb71770d8ec554d4d34c23f?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/37ea7175f5ae6557d01bb38e147f6a02a540714ecdb71770d8ec554d4d34c23f?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","caption":"Bulbul"},"url":"https:\/\/webkul.com\/blog\/author\/bulbul896\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/71533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=71533"}],"version-history":[{"count":13,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/71533\/revisions"}],"predecessor-version":[{"id":423266,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/71533\/revisions\/423266"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/70648"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=71533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=71533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=71533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}