{"id":136670,"date":"2018-08-04T08:03:25","date_gmt":"2018-08-04T08:03:25","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=136670"},"modified":"2024-07-03T09:00:15","modified_gmt":"2024-07-03T09:00:15","slug":"wordpress-custom-widget","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/","title":{"rendered":"WordPress &#8211; Custom Widget"},"content":{"rendered":"<h1>WordPress Widget<\/h1>\n<p>It is a small block that performs a specific function. You can add these widgets in sidebars areas on your web page.<\/p>\n<p>WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. Widgets can be easily dragged and dropped into a specific widget area.<\/p>\n<p>You can find the list of available widgets in\u00a0<strong>Appearance \u00bb Widgets\u00a0<\/strong>section in your WordPress dashboard.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-136742\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1.png\" alt=\"Custom Widget\" width=\"850\" height=\"347\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1.png 1142w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1-250x102.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1-300x122.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1-768x313.png 768w\" sizes=\"(max-width: 850px) 100vw, 850px\" loading=\"lazy\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-136744\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget.png\" alt=\"Customer Widget\" width=\"850\" height=\"416\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget.png 1249w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget-250x122.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget-300x147.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget-768x376.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget-1200x588.png 1200w\" sizes=\"(max-width: 850px) 100vw, 850px\" loading=\"lazy\" \/><\/p>\n<h1>Creating Custom Widget<\/h1>\n<p>For creating a custom widget, You have to write code in functions.php file in your theme folder or it&#8217;s best practise to write code in separate file and include it in functions.php file.<\/p>\n<p>Basically, there are three major functions of a widget which can be broken down into\u00a0<strong>widget<\/strong>,\u00a0<strong>update<\/strong>\u00a0and\u00a0<strong>form<\/strong>.<\/p>\n<ul>\n<li>function widget ()<\/li>\n<li>function update ()<\/li>\n<li>function form ()<\/li>\n<\/ul>\n<h2>Basic Structure<\/h2>\n<p>The bone structure of our widget is something like this:<\/p>\n<pre class=\"brush:php\">add_action( 'widgets_init', 'wp_custom_widget' );\n \nfunction wp_custom_widget() {\n    register_widget( 'custom_widget' );\n}\n \nclass custom_widget extends WP_Widget {\n \n    public function __construct() {\n       \/\/ Widget Details\n    }\n \n    public function form( $instance ) {\n        \/\/ Backend Form\n    }\n \n    public function update( $new_instance, $old_instance ) {  \n        return $new_instance;\n    }\n \n    public function widget( $args, $instance ) {\n        \/\/ Frontend display HTML\n    }\n \n}\n\n<\/pre>\n<h2>Step 1<\/h2>\n<p>Before we do all that we&#8217;ll first load our widget whenever necessary by the function <strong>&#8220;widgets_init&#8221;<\/strong>. This is an action hook<\/p>\n<pre class=\"brush:php\">add_action( 'widgets_init', 'wp_custom_widget' );<\/pre>\n<p>Next thing that we&#8217;ll do is register our widget in WordPress so that it is available under the widgets section.<\/p>\n<pre class=\"brush:php\">function wp_custom_widget() {\n    register_widget( 'custom_widget' );\n}\n<\/pre>\n<h2>Step 2<\/h2>\n<p>We will enclose our widget in a class. The name of the class is important, It&#8217;s same name which you have name as in register_widget ().<\/p>\n<pre class=\"brush:php\">class custom_widget extends WP_Widget {}\n<\/pre>\n<h2>Step 3 function\u00a0__construct()<\/h2>\n<p>The __construct() method is used to assign an id, title,\u00a0class name\u00a0 and description to the widget. Here\u2019s how the constructor function looks :-<\/p>\n<pre class=\"brush:php\">public function __construct() {\n\n       $widget_options = array( \n        'classname' =&gt; 'widget_class',\n        'description' =&gt; 'This is a Custom Widget',\n        );\n\n       parent::__construct( 'widget_id', 'Widget Title', $widget_options );\n    }<\/pre>\n<p><img decoding=\"async\" class=\"alignnone wp-image-136802\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget3.png\" alt=\"Customer Widget\" width=\"850\" height=\"153\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget3.png 1293w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget3-250x45.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget3-300x54.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget3-768x138.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget3-1200x215.png 1200w\" sizes=\"(max-width: 850px) 100vw, 850px\" loading=\"lazy\" \/><\/p>\n<h2>Step 4\u00a0 function form()<\/h2>\n<p>The form() method is used to add setting fields to the widget which will be displayed in the WordPress admin area.<\/p>\n<pre class=\"brush:php\">public function form( $instance ) {\n\n       $title = ( ! empty( $instance['mk_title'] ) ) ? $instance['mk_title'] : '';\n       ?&gt;\n\n       &lt;p&gt;\n         &lt;label for=\"&lt;?php echo $this-&gt;get_field_id( 'mk_title' ); ?&gt;\"&gt;Title:&lt;\/label&gt;\n         &lt;input type=\"text\" name=\"&lt;?php echo $this-&gt;get_field_name('mk_title');?&gt;\" id=\"&lt;?php echo $this-&gt;get_field_id('mk_title'); ?&gt;\" value=\"&lt;?php echo $title; ?&gt;\"&gt;\n       &lt;\/p&gt;\n\n &lt;?php\n}\n<\/pre>\n<p>Use the\u00a0<code>get_field_name()<\/code>\u00a0and\u00a0<code>get_field_id()<\/code>\u00a0function to output the id and name of fields. WordPress handles multiple sidebars and widgets, so it\u2019ll add its own stuff to the name of the field.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-136815\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget5.png\" alt=\"Customer Widget\" width=\"850\" height=\"209\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget5.png 959w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget5-250x62.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget5-300x74.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget5-768x189.png 768w\" sizes=\"(max-width: 850px) 100vw, 850px\" loading=\"lazy\" \/><\/p>\n<h2>Step 5 function update ()<\/h2>\n<p>update () method is used to save data in database, this method pass two parameter $new_instance and $old_instance<\/p>\n<pre class=\"brush:php\">public function update( $new_instance, $old_instance ) {\n\t\t$instance['my_title'] = $new_instance['my_title'];\n\t\treturn $instance;\n\n\t}\n\n<\/pre>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-136818\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget4-1.png\" alt=\"Customer Widget\" width=\"982\" height=\"232\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget4-1.png 982w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget4-1-250x59.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget4-1-300x71.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget4-1-768x181.png 768w\" sizes=\"(max-width: 982px) 100vw, 982px\" loading=\"lazy\" \/><\/p>\n<h2>Step 6 function widget ()<\/h2>\n<p>The widget () method used to show widget data in front-end ( in your web page sidebar ) , this method pass two parameter $args and $instance, $args set position of widget and $instance have stored widget data.<\/p>\n<pre class=\"brush:php\">public function widget( $args, $instance ) {\n\n\t\t$title = $instance['my_title'];\n\n\t\techo $args['before_widget'];\n\n\t\techo $title;\n\n\t\techo $args['after_widget'];\n\t}\n\n<\/pre>\n<p><img decoding=\"async\" class=\"alignnone wp-image-136819\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget6.png\" alt=\"Customer Widget\" width=\"850\" height=\"329\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget6.png 1308w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget6-250x97.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget6-300x116.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget6-768x297.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget6-1200x464.png 1200w\" sizes=\"(max-width: 850px) 100vw, 850px\" loading=\"lazy\" \/><\/p>\n\n\n<h2 class=\"wp-block-heading\">Support<\/h2>\n\n\n\n<p>That is all for this dev blog on How to Add Custom Fields to User Profile Page in WordPress. For any technical assistance, please&nbsp;<a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\" target=\"_blank\" rel=\"noreferrer noopener\">raise a ticket<\/a>&nbsp;or reach us by mail at&nbsp;support@webkul.com<\/p>\n\n\n\n<p>Kindly visit&nbsp;the&nbsp;<a href=\"https:\/\/store.webkul.com\/woocommerce-plugins.html\" target=\"_blank\" rel=\"noreferrer noopener\">WooCommerce plugins<\/a>&nbsp;page to explore a wide variety of solutions to add more features to your online store get a&nbsp;<a href=\"https:\/\/webkul.com\/wordpress-theme-development-services\/\">Custom WordPress Theme Development Service<\/a>. Also, you can&nbsp;<a href=\"https:\/\/webkul.com\/hire-woocommerce-developers\/\" target=\"_blank\" rel=\"noreferrer noopener\">hire WooCommerce developers<\/a>&nbsp;for your project work.<\/p>\n\n\n\n<p>!!Have a Great Day Ahead!!<\/p>\n\n\n\n<p>See you in the next post. Keep reading \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress Widget It is a small block that performs a specific function. You can add these widgets in sidebars areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. Widgets can be easily dragged and <a href=\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":208,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1260],"tags":[],"class_list":["post-136670","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WordPress - Custom Widget - Webkul Blog<\/title>\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\/wordpress-custom-widget\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress - Custom Widget - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"WordPress Widget It is a small block that performs a specific function. You can add these widgets in sidebars areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. Widgets can be easily dragged and [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/\" \/>\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=\"2018-08-04T08:03:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-03T09:00:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1.png\" \/>\n<meta name=\"author\" content=\"Manjeet Kumar\" \/>\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=\"Manjeet Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/\"},\"author\":{\"name\":\"Manjeet Kumar\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/0d9f23c10dd088ff08547036334b3724\"},\"headline\":\"WordPress &#8211; Custom Widget\",\"datePublished\":\"2018-08-04T08:03:25+00:00\",\"dateModified\":\"2024-07-03T09:00:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/\"},\"wordCount\":465,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1.png\",\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/\",\"url\":\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/\",\"name\":\"WordPress - Custom Widget - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1.png\",\"datePublished\":\"2018-08-04T08:03:25+00:00\",\"dateModified\":\"2024-07-03T09:00:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1.png\",\"width\":\"1142\",\"height\":\"466\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WordPress &#8211; Custom Widget\"}]},{\"@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\/0d9f23c10dd088ff08547036334b3724\",\"name\":\"Manjeet Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6d86ed3fe5475956ff997d273dcf5bc857e9bcfacafc241015258f596eff50b0?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6d86ed3fe5475956ff997d273dcf5bc857e9bcfacafc241015258f596eff50b0?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Manjeet Kumar\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/manjeet-kumarwp681\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WordPress - Custom Widget - Webkul Blog","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\/wordpress-custom-widget\/","og_locale":"en_US","og_type":"article","og_title":"WordPress - Custom Widget - Webkul Blog","og_description":"WordPress Widget It is a small block that performs a specific function. You can add these widgets in sidebars areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. Widgets can be easily dragged and [...]","og_url":"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2018-08-04T08:03:25+00:00","article_modified_time":"2024-07-03T09:00:15+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1.png","type":"","width":"","height":""}],"author":"Manjeet Kumar","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Manjeet Kumar","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/"},"author":{"name":"Manjeet Kumar","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/0d9f23c10dd088ff08547036334b3724"},"headline":"WordPress &#8211; Custom Widget","datePublished":"2018-08-04T08:03:25+00:00","dateModified":"2024-07-03T09:00:15+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/"},"wordCount":465,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1.png","articleSection":["WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/","url":"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/","name":"WordPress - Custom Widget - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1.png","datePublished":"2018-08-04T08:03:25+00:00","dateModified":"2024-07-03T09:00:15+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/wordpress-custom-widget\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/widget1-1.png","width":"1142","height":"466"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/wordpress-custom-widget\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"WordPress &#8211; Custom Widget"}]},{"@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\/0d9f23c10dd088ff08547036334b3724","name":"Manjeet Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6d86ed3fe5475956ff997d273dcf5bc857e9bcfacafc241015258f596eff50b0?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6d86ed3fe5475956ff997d273dcf5bc857e9bcfacafc241015258f596eff50b0?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Manjeet Kumar"},"url":"https:\/\/webkul.com\/blog\/author\/manjeet-kumarwp681\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/136670","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\/208"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=136670"}],"version-history":[{"count":59,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/136670\/revisions"}],"predecessor-version":[{"id":450545,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/136670\/revisions\/450545"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=136670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=136670"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=136670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}