{"id":1993,"date":"2023-03-06T15:56:52","date_gmt":"2023-03-06T15:56:52","guid":{"rendered":"https:\/\/kybernaut.cz\/clanky\/how-to-use-code-snippets-plugin\/"},"modified":"2023-03-06T15:56:52","modified_gmt":"2023-03-06T15:56:52","slug":"how-to-use-code-snippets-plugin","status":"publish","type":"post","link":"https:\/\/kybernaut.cz\/en\/clanky\/how-to-use-code-snippets-plugin\/","title":{"rendered":"How to use Code Snippets plugin"},"content":{"rendered":"<p><a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\" rel=\"nofollow noopener\" target=\"_blank\">Code Snippets<\/a> is a powerful WordPress plugin that lets you easily add custom code snippets to your website without modifying your theme&#8217;s functions.php file or creating a child theme.<\/p>\n<p>Here&#8217;s how to use it:<\/p>\n<ol>\n<li>Install and activate the Code Snippets plugin from the WordPress plugin repository.<\/li>\n<li>In your WordPress dashboard, navigate to the &#8220;Snippets&#8221; menu.<\/li>\n<li>Click the &#8220;Add New&#8221; button to create a new code snippet.<\/li>\n<li>Give your snippet a name, add your code to the &#8220;Code&#8221; box, and add a description and tags optionally.<\/li>\n<li>Choose the &#8220;Scope&#8221; of your snippet, determining where the code will be executed on your website.<\/li>\n<li>Click the &#8220;Save Changes and Activate&#8221; button to activate your new code snippet.<\/li>\n<\/ol>\n<p>That&#8217;s it! With Code Snippets, you can easily add custom functionality to your WordPress website without having to modify your theme&#8217;s files.<\/p>\n<h2>Export and import snippets<\/h2>\n<p>Code Snippets also allows you to easily import and export your snippets between different WordPress websites or back up your snippets for safekeeping.<\/p>\n<p>Export<\/p>\n<ol>\n<li>In the WordPress control panel, go to the &#8220;Snippets&#8221; menu.<\/li>\n<li>Click on &#8220;Export&#8221; next to the selected snippet. If you need to select multiple snippets, check the boxes next to the snippet name and select &#8220;Export&#8221; in the dropdown box.<\/li>\n<li>The file will be saved directly to your computer.<\/li>\n<\/ol>\n<p>Import:<\/p>\n<ol>\n<li>In the WordPress control panel, go to the &#8220;Snippets&#8221; menu and the &#8220;Import&#8221; submenu.<\/li>\n<li>Select the file you want to import and click the &#8220;Upload files and import &#8221; button.<\/li>\n<\/ol>\n<p>That&#8217;s it! With Code Snippets, you can easily import and export your custom code snippets between different WordPress websites or backup your snippets for safekeeping.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Add custom code snippets to your WordPress site easily with Code Snippets plugin. No need to modify your theme files. Export\/import your snippets too!<\/p>\n","protected":false},"author":1,"featured_media":1760,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"iawp_total_views":84,"footnotes":""},"categories":[71,8,70],"tags":[],"class_list":["post-1993","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-pluginy","category-snippets"],"acf":[],"_links":{"self":[{"href":"https:\/\/kybernaut.cz\/en\/wp-json\/wp\/v2\/posts\/1993","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kybernaut.cz\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kybernaut.cz\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kybernaut.cz\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kybernaut.cz\/en\/wp-json\/wp\/v2\/comments?post=1993"}],"version-history":[{"count":0,"href":"https:\/\/kybernaut.cz\/en\/wp-json\/wp\/v2\/posts\/1993\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kybernaut.cz\/en\/wp-json\/wp\/v2\/media\/1760"}],"wp:attachment":[{"href":"https:\/\/kybernaut.cz\/en\/wp-json\/wp\/v2\/media?parent=1993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kybernaut.cz\/en\/wp-json\/wp\/v2\/categories?post=1993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kybernaut.cz\/en\/wp-json\/wp\/v2\/tags?post=1993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}