{"id":1138,"date":"2020-01-12T00:26:10","date_gmt":"2020-01-12T00:26:10","guid":{"rendered":"https:\/\/www.magetop.com\/blog\/?p=1138"},"modified":"2021-07-22T02:58:40","modified_gmt":"2021-07-22T02:58:40","slug":"add-custom-category-attributes-in-magento-2","status":"publish","type":"post","link":"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/","title":{"rendered":"Add Custom Category Attributes In Magento 2"},"content":{"rendered":"\n\n\n<p>In the previous article, we learned about <a href=\"https:\/\/www.magetop.com\/blog\/how-to-get-product-collection-in-magento-2\/\" target=\"_blank\" rel=\"noopener noreferrer\">How to get product collection in Magento 2<\/a>. Today, we will introduce you about <strong>Add custom category attributes in Magento 2<\/strong>.<\/p>\n\n\n\n<p>I think you should read <a href=\"https:\/\/www.magetop.com\/blog\/how-to-create-new-theme-in-magento-2\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"How To Create New Theme In Magento 2 (opens in a new tab)\">How To Create New Theme In Magento 2<\/a> first.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"> Create the attributes<\/h2>\n\n\n\n<p>We\u2019ll use our module to make script update category attributes.<\/p>\n\n\n\n<p>Suppose current our module version is 1.0.0, create file:<\/p>\n\n\n\n<p><code>app\/code\/&lt;vendor_name&gt;\/&lt;module_name&gt;\/Setup\/UpgradeSchema.php<\/code> should look like:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&lt;?php\nnamespace Magetop\\Themes\\Setup;\n \nuse Magento\\Eav\\Setup\\EavSetupFactory;\nuse Magento\\Framework\\Setup\\ModuleContextInterface;\nuse Magento\\Framework\\Setup\\ModuleDataSetupInterface;\nuse Magento\\Framework\\Setup\\UpgradeDataInterface;\n \nclass UpgradeData implements UpgradeDataInterface\n{\n    private $eavSetupFactory;\n    public function __construct(EavSetupFactory $eavSetupFactory)\n    {\n        $this-&gt;eavSetupFactory = $eavSetupFactory;\n    }\n    public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)\n    {\n        $setup-&gt;startSetup();\n        if ($context-&gt;getVersion() &amp;&amp; version_compare($context-&gt;getVersion(), '1.0.1') &lt; 0) {\n  \n            $eavSetup = $this-&gt;eavSetupFactory-&gt;create(&#x5B;'setup' =&gt; $setup]);\n  \n            $eavSetup-&gt;addAttribute(\n            \\Magento\\Catalog\\Model\\Category::ENTITY,\n            'cat_featured',\n            &#x5B;\n                'type' =&gt; 'int',\n                'label' =&gt; 'Is featured',\n                'input' =&gt; 'boolean',\n                'source'   =&gt; 'Magento\\Eav\\Model\\Entity\\Attribute\\Source\\Boolean',\n                'required' =&gt; false,\n                'sort_order' =&gt; 10,\n                'global' =&gt; \\Magento\\Eav\\Model\\Entity\\Attribute\\ScopedAttributeInterface::SCOPE_STORE,\n                'wysiwyg_enabled' =&gt; true,\n                'default' =&gt; '0',\n                'group' =&gt; 'General Information'\n            ]\n        );\n        } \n        $setup-&gt;endSetup();\n    }\n}\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Show its in backend<\/h2>\n\n\n\n<p>Create file <code>app\/code\/&lt;vendor_name&gt;\/&lt;module_name&gt;\/view\/adminhtml\/ui_component\/category_form.xml<\/code> should look like:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&lt;?xml version=&quot;1.0&quot; ?&gt;\n&lt;form xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:module:Magento_Ui:etc\/ui_configuration.xsd&quot;&gt;\n    &lt;fieldset name=&quot;general&quot;&gt;\n        &lt;field name=&quot;cat_featured&quot; sortOrder=&quot;41&quot;&gt;\n            &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;config&quot; xsi:type=&quot;array&quot;&gt;\n                    &lt;item name=&quot;dataType&quot; xsi:type=&quot;string&quot;&gt;boolean&lt;\/item&gt;\n                    &lt;item name=&quot;formElement&quot; xsi:type=&quot;string&quot;&gt;checkbox&lt;\/item&gt;\n                    &lt;item name=&quot;label&quot; xsi:type=&quot;string&quot; translate=&quot;true&quot;&gt;Is featured&lt;\/item&gt;\n                    &lt;item name=&quot;prefer&quot; xsi:type=&quot;string&quot;&gt;toggle&lt;\/item&gt;\n                    &lt;item name=&quot;valueMap&quot; xsi:type=&quot;array&quot;&gt;\n                        &lt;item name=&quot;true&quot; xsi:type=&quot;string&quot;&gt;1&lt;\/item&gt;\n                        &lt;item name=&quot;false&quot; xsi:type=&quot;string&quot;&gt;0&lt;\/item&gt;\n                    &lt;\/item&gt;\n                    &lt;item name=&quot;default&quot; xsi:type=&quot;number&quot;&gt;0&lt;\/item&gt;\n                &lt;\/item&gt;\n            &lt;\/argument&gt;\n        &lt;\/field&gt;\n    &lt;\/fieldset&gt;\n&lt;\/form&gt;\n<\/pre><\/div>\n\n\n<p>Then update version for our module. Update file <code>app\/code\/&lt;vendor_name&gt;\/&lt;module_name&gt;\/etc\/module.xml<\/code> should look like:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&lt;?xml version=&quot;1.0&quot;?&gt;\n&lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:Module\/etc\/module.xsd&quot;&gt;\n    &lt;module name=&quot;Magetop_Themes&quot; setup_version=&quot;1.0.1&quot;\/&gt;\n&lt;\/config&gt;\n<\/pre><\/div>\n\n\n<p>After open command prompt and change directory to your magento install directory<\/p>\n\n\n\n<p>Run the following command in command prompt:<\/p>\n\n\n\n<p><code>php bin\/magento setup:upgrade<\/code><\/p>\n\n\n\n<p><code>php bin\/magento cache:clean<\/code><\/p>\n\n\n\n<p>Then go to backend refresh cache to see your changes applied.<\/p>\n\n\n\n<p>We updated our file structure looks as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>app\/code\/Magetop\/\n  \u251c\u2500\u2500 Themes\/\n  \u2502   \u251c\u2500\u2500 Setup\/\n  \u2502   \u2502     \u251c\u2500\u2500 UpgradeSchema.php\n  \u2502   \u251c\u2500\u2500 etc\/\n  \u2502   \u2502     \u251c\u2500\u2500 module.xml\n  \u2502   \u251c\u2500\u2500 view\/\n  \u2502   \u2502     \u251c\u2500\u2500 adminhtml\/\n  \u2502   \u2502     \u2502   \u251c\u2500\u2500 ui_component\/\n  \u2502   \u2502     \u2502   \u2502   \u251c\u2500\u2500 category_form.xml<\/code><\/pre>\n\n\n\n<p>Good luck!<\/p>\n\n\n\n<p>This is  <strong>Add custom category attributes in Magento 2<\/strong>.<\/p>\n\n\n\n<p>You can see the next post: <a href=\"https:\/\/www.magetop.com\/blog\/make-default-system-config-value-in-magento-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">Make Default System Config Value In Magento 2<\/a>.<\/p>\n\n\n\n<p>Follow us for more helpful tutorial!<\/p>\n\n\n\n<p>We hope this is useful blog for you.<\/p>\n\n\n\n<p>Thank you for reading!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the previous article, we learned about How to get product collection in Magento 2. Today, we will introduce you about Add custom category attributes in Magento 2. I think you should read How To Create New Theme In Magento 2 first.<\/p>\n","protected":false},"author":1,"featured_media":1143,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[217,216,107],"class_list":["post-1138","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento-2-tutorials","tag-add-custom-category-attributes","tag-add-custom-category-attributes-in-magento-2","tag-magento-2-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Add Custom Category Attributes In Magento 2 - Magetop Blog<\/title>\n<meta name=\"description\" content=\"In this article, we will introduce you about Add custom category attributes in Magento 2. I think you should read it. It&#039;s very helpful for you...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add Custom Category Attributes In Magento 2 - Magetop Blog\" \/>\n<meta property=\"og:description\" content=\"In this article, we will introduce you about Add custom category attributes in Magento 2. I think you should read it. It&#039;s very helpful for you...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Magetop Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/MagetopStore\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/MagetopStore\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-12T00:26:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-22T02:58:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i1.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Add-Custom-Category-Attributes.png?fit=750%2C445&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"445\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Adam Roger\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/MagetopStore\" \/>\n<meta name=\"twitter:site\" content=\"@MagetopStore\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Adam Roger\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/\"},\"author\":{\"name\":\"Adam Roger\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/1bf4d5d0c4f280303345970448feb411\"},\"headline\":\"Add Custom Category Attributes In Magento 2\",\"datePublished\":\"2020-01-12T00:26:10+00:00\",\"dateModified\":\"2021-07-22T02:58:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/\"},\"wordCount\":169,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Add-Custom-Category-Attributes.png?fit=750%2C445&ssl=1\",\"keywords\":[\"Add Custom Category Attributes\",\"Add Custom Category Attributes In Magento 2\",\"magento 2 tutorials\"],\"articleSection\":[\"Magento 2 Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/\",\"url\":\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/\",\"name\":\"Add Custom Category Attributes In Magento 2 - Magetop Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Add-Custom-Category-Attributes.png?fit=750%2C445&ssl=1\",\"datePublished\":\"2020-01-12T00:26:10+00:00\",\"dateModified\":\"2021-07-22T02:58:40+00:00\",\"description\":\"In this article, we will introduce you about Add custom category attributes in Magento 2. I think you should read it. It's very helpful for you...\",\"breadcrumb\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Add-Custom-Category-Attributes.png?fit=750%2C445&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Add-Custom-Category-Attributes.png?fit=750%2C445&ssl=1\",\"width\":750,\"height\":445,\"caption\":\"Add Custom Category Attributes In Magento 2\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.magetop.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Add Custom Category Attributes In Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#website\",\"url\":\"https:\/\/www.magetop.com\/blog\/\",\"name\":\"Magetop Blog\",\"description\":\"Exploring Magento Tips, Tricks, and Trends\",\"publisher\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.magetop.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\",\"name\":\"Magetop.com\",\"url\":\"https:\/\/www.magetop.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1\",\"width\":475,\"height\":475,\"caption\":\"Magetop.com\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/MagetopStore\",\"https:\/\/x.com\/MagetopStore\",\"https:\/\/www.linkedin.com\/company\/magetop\",\"https:\/\/www.pinterest.com\/magetop\",\"https:\/\/www.youtube.com\/channel\/UCXoiJsz88OfPmwa8QpUkwOA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/1bf4d5d0c4f280303345970448feb411\",\"name\":\"Adam Roger\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2ea543086258299e700cc48d893c02653c4a87b5466f23de66240a677d192811?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2ea543086258299e700cc48d893c02653c4a87b5466f23de66240a677d192811?s=96&d=mm&r=g\",\"caption\":\"Adam Roger\"},\"description\":\"CEO and Founder of Magetop. A friend, a husband and a dad of two children. Adam loves to travel to experience new cultures and discover what is happening with ecommerce all around the world.\",\"sameAs\":[\"https:\/\/www.magetop.com\",\"https:\/\/www.facebook.com\/MagetopStore\",\"https:\/\/www.instagram.com\/magetopstore\",\"https:\/\/www.linkedin.com\/company\/magetop\",\"https:\/\/www.pinterest.com\/magetop\",\"https:\/\/x.com\/https:\/\/twitter.com\/MagetopStore\",\"https:\/\/www.youtube.com\/channel\/UCXoiJsz88OfPmwa8QpUkwOA\",\"https:\/\/magetop.tumblr.com\"],\"url\":\"https:\/\/www.magetop.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Add Custom Category Attributes In Magento 2 - Magetop Blog","description":"In this article, we will introduce you about Add custom category attributes in Magento 2. I think you should read it. It's very helpful for you...","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:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/","og_locale":"en_US","og_type":"article","og_title":"Add Custom Category Attributes In Magento 2 - Magetop Blog","og_description":"In this article, we will introduce you about Add custom category attributes in Magento 2. I think you should read it. It's very helpful for you...","og_url":"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/","og_site_name":"Magetop Blog","article_publisher":"https:\/\/www.facebook.com\/MagetopStore","article_author":"https:\/\/www.facebook.com\/MagetopStore","article_published_time":"2020-01-12T00:26:10+00:00","article_modified_time":"2021-07-22T02:58:40+00:00","og_image":[{"width":750,"height":445,"url":"https:\/\/i1.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Add-Custom-Category-Attributes.png?fit=750%2C445&ssl=1","type":"image\/png"}],"author":"Adam Roger","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/MagetopStore","twitter_site":"@MagetopStore","twitter_misc":{"Written by":"Adam Roger","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#article","isPartOf":{"@id":"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/"},"author":{"name":"Adam Roger","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/1bf4d5d0c4f280303345970448feb411"},"headline":"Add Custom Category Attributes In Magento 2","datePublished":"2020-01-12T00:26:10+00:00","dateModified":"2021-07-22T02:58:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/"},"wordCount":169,"commentCount":0,"publisher":{"@id":"https:\/\/www.magetop.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Add-Custom-Category-Attributes.png?fit=750%2C445&ssl=1","keywords":["Add Custom Category Attributes","Add Custom Category Attributes In Magento 2","magento 2 tutorials"],"articleSection":["Magento 2 Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/","url":"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/","name":"Add Custom Category Attributes In Magento 2 - Magetop Blog","isPartOf":{"@id":"https:\/\/www.magetop.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#primaryimage"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Add-Custom-Category-Attributes.png?fit=750%2C445&ssl=1","datePublished":"2020-01-12T00:26:10+00:00","dateModified":"2021-07-22T02:58:40+00:00","description":"In this article, we will introduce you about Add custom category attributes in Magento 2. I think you should read it. It's very helpful for you...","breadcrumb":{"@id":"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#primaryimage","url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Add-Custom-Category-Attributes.png?fit=750%2C445&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Add-Custom-Category-Attributes.png?fit=750%2C445&ssl=1","width":750,"height":445,"caption":"Add Custom Category Attributes In Magento 2"},{"@type":"BreadcrumbList","@id":"https:\/\/www.magetop.com\/blog\/add-custom-category-attributes-in-magento-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.magetop.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Add Custom Category Attributes In Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/www.magetop.com\/blog\/#website","url":"https:\/\/www.magetop.com\/blog\/","name":"Magetop Blog","description":"Exploring Magento Tips, Tricks, and Trends","publisher":{"@id":"https:\/\/www.magetop.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.magetop.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.magetop.com\/blog\/#organization","name":"Magetop.com","url":"https:\/\/www.magetop.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1","width":475,"height":475,"caption":"Magetop.com"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/MagetopStore","https:\/\/x.com\/MagetopStore","https:\/\/www.linkedin.com\/company\/magetop","https:\/\/www.pinterest.com\/magetop","https:\/\/www.youtube.com\/channel\/UCXoiJsz88OfPmwa8QpUkwOA"]},{"@type":"Person","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/1bf4d5d0c4f280303345970448feb411","name":"Adam Roger","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2ea543086258299e700cc48d893c02653c4a87b5466f23de66240a677d192811?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2ea543086258299e700cc48d893c02653c4a87b5466f23de66240a677d192811?s=96&d=mm&r=g","caption":"Adam Roger"},"description":"CEO and Founder of Magetop. A friend, a husband and a dad of two children. Adam loves to travel to experience new cultures and discover what is happening with ecommerce all around the world.","sameAs":["https:\/\/www.magetop.com","https:\/\/www.facebook.com\/MagetopStore","https:\/\/www.instagram.com\/magetopstore","https:\/\/www.linkedin.com\/company\/magetop","https:\/\/www.pinterest.com\/magetop","https:\/\/x.com\/https:\/\/twitter.com\/MagetopStore","https:\/\/www.youtube.com\/channel\/UCXoiJsz88OfPmwa8QpUkwOA","https:\/\/magetop.tumblr.com"],"url":"https:\/\/www.magetop.com\/blog\/author\/admin\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Add-Custom-Category-Attributes.png?fit=750%2C445&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/paOdw5-im","jetpack-related-posts":[{"id":1144,"url":"https:\/\/www.magetop.com\/blog\/make-default-system-config-value-in-magento-2\/","url_meta":{"origin":1138,"position":0},"title":"Make Default System Config Value In Magento 2","author":"Adam Roger","date":"January 12, 2020","format":false,"excerpt":"In the previous article, we learned about Add Custom Category Attributes In Magento 2. Today, we will introduce you about Make default system config value in Magento 2. I think you should read How To Create New Theme In Magento 2 first.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Make Default System Config Value In Magento 2","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Make-Default-System-Config-Value.png?fit=750%2C445&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Make-Default-System-Config-Value.png?fit=750%2C445&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Make-Default-System-Config-Value.png?fit=750%2C445&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/Make-Default-System-Config-Value.png?fit=750%2C445&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3095,"url":"https:\/\/www.magetop.com\/blog\/top-magento-2-customer-attributes-extensions\/","url_meta":{"origin":1138,"position":1},"title":"Top 9 Magento 2 Customer Attributes Extensions","author":"Aaron LX","date":"November 4, 2020","format":false,"excerpt":"Magento 2 Customer Attributes Extensions allow to gather more information from the user with the added customer attributes. This module will make it easy for you to do that without having to develop manual programmatically. In this blog, We will introduce good quality extensions to help you make better choices.\u2026","rel":"","context":"In &quot;Magento News&quot;","block_context":{"text":"Magento News","link":"https:\/\/www.magetop.com\/blog\/magento-news\/"},"img":{"alt_text":"Top Magento 2 Customer Attributes Extensions 1","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/11\/Top-Magento-2-Customer-Attributes-Extensions-1.jpg?fit=750%2C445&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/11\/Top-Magento-2-Customer-Attributes-Extensions-1.jpg?fit=750%2C445&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/11\/Top-Magento-2-Customer-Attributes-Extensions-1.jpg?fit=750%2C445&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/11\/Top-Magento-2-Customer-Attributes-Extensions-1.jpg?fit=750%2C445&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":983,"url":"https:\/\/www.magetop.com\/blog\/manage-attributes-in-magento-2\/","url_meta":{"origin":1138,"position":2},"title":"Manage Attributes In Magento 2","author":"Adam Roger","date":"December 27, 2019","format":false,"excerpt":"In the previous article, I have briefly introduced some basic functions for beginners. If you have not read that article, you can read it: Magento 2 Tutorial For Beginners - Basic Guide. Following the previous article, I will help you learn about Manage Attributes In Magento 2.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Manage Attributes In Magento 2","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2019\/12\/Manage-Attributes-In-Magento-2.png?fit=750%2C450&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2019\/12\/Manage-Attributes-In-Magento-2.png?fit=750%2C450&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2019\/12\/Manage-Attributes-In-Magento-2.png?fit=750%2C450&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2019\/12\/Manage-Attributes-In-Magento-2.png?fit=750%2C450&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":595,"url":"https:\/\/www.magetop.com\/blog\/top-magento-ajax-layered-navigation-extensions\/","url_meta":{"origin":1138,"position":3},"title":"Top 10 Magento 2 Ajax Layered Navigation Extensions","author":"Adam Roger","date":"November 15, 2019","format":false,"excerpt":"Magento 2 Ajax Layered Navigation is a tool allows showing filters product and customers can search your product by using it. It makes increase their online shopping experience. If you manage online store with multiple catalogs of products, this extension will be helpful for your store.","rel":"","context":"In &quot;Magento News&quot;","block_context":{"text":"Magento News","link":"https:\/\/www.magetop.com\/blog\/magento-news\/"},"img":{"alt_text":"Top 10 Magento 2 Ajax Layered Navigation Extensions","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2019\/11\/Top-10-Magento-2-Ajax-Layered-Navigation-Extensions.png?fit=770%2C450&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2019\/11\/Top-10-Magento-2-Ajax-Layered-Navigation-Extensions.png?fit=770%2C450&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2019\/11\/Top-10-Magento-2-Ajax-Layered-Navigation-Extensions.png?fit=770%2C450&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2019\/11\/Top-10-Magento-2-Ajax-Layered-Navigation-Extensions.png?fit=770%2C450&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1130,"url":"https:\/\/www.magetop.com\/blog\/how-to-get-product-collection-in-magento-2\/","url_meta":{"origin":1138,"position":4},"title":"How To Get Product Collection In Magento 2","author":"Adam Roger","date":"January 10, 2020","format":false,"excerpt":"In the previous article, we learned about How To Make Custom Page Layout In Magento 2. Today, we will introduce you about How To Get Product Collection In Magento 2. I think you should read How To Create New Theme In Magento 2 first.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"How To Get Product Collection In Magento 2","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/How-To-Get-Product-Collection.png?fit=750%2C445&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/How-To-Get-Product-Collection.png?fit=750%2C445&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/How-To-Get-Product-Collection.png?fit=750%2C445&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/How-To-Get-Product-Collection.png?fit=750%2C445&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3154,"url":"https:\/\/www.magetop.com\/blog\/top-magento-2-elasticsearch-extensions\/","url_meta":{"origin":1138,"position":5},"title":"Top 5 Magento 2 Elasticsearch Extensions","author":"Aaron LX","date":"November 10, 2020","format":false,"excerpt":"Magento 2 Elasticsearch Extensions provide advanced search functionality for your store website. With highly accurate real-time recommendation results, your customers will have a great search experience that drives sales thanks to it. In this blog, We will introduce good quality extensions to help you make better choices. Here are Top\u2026","rel":"","context":"In &quot;Magento News&quot;","block_context":{"text":"Magento News","link":"https:\/\/www.magetop.com\/blog\/magento-news\/"},"img":{"alt_text":"Top Magento 2 Elasticsearch Extensions","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/11\/Top-Magento-2-Elasticsearch-Extensions.jpg?fit=750%2C445&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/11\/Top-Magento-2-Elasticsearch-Extensions.jpg?fit=750%2C445&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/11\/Top-Magento-2-Elasticsearch-Extensions.jpg?fit=750%2C445&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/11\/Top-Magento-2-Elasticsearch-Extensions.jpg?fit=750%2C445&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/1138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/comments?post=1138"}],"version-history":[{"count":4,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/1138\/revisions"}],"predecessor-version":[{"id":4135,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/1138\/revisions\/4135"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/media\/1143"}],"wp:attachment":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/media?parent=1138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/categories?post=1138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/tags?post=1138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}