{"id":2094,"date":"2023-05-30T08:31:58","date_gmt":"2023-05-30T08:31:58","guid":{"rendered":"https:\/\/wpcode.com\/?post_type=wpcode_doc&#038;p=2094"},"modified":"2026-10-05T09:50:25","modified_gmt":"2026-10-05T13:50:25","slug":"smart-tags","status":"publish","type":"wpcode_doc","link":"https:\/\/wpcode.com\/docs\/smart-tags\/","title":{"rendered":"Using Smart Tags"},"content":{"rendered":"<p>Would you like your snippets to greet each visitor by name, or print the current post title without you writing any code? All you need is a snippet to work in and a few clicks in the code editor.<\/p>\n<p>In this guide, we&#8217;ll walk you through inserting smart tags into a WPCode snippet.<\/p>\n<div class=\"alert alert-warning\">\n<p><strong>Requirements<\/strong>: Smart tags are a premium feature, so you&#8217;ll need a paid WPCode license to use them.<\/p>\n<\/div>\n<ul class=\"toc\">\n<li><a href=\"#what-are-smart-tags\">What Are Smart Tags?<\/a><\/li>\n<li><a href=\"#creating-a-snippet-that-supports-smart-tags\">Creating a Snippet That Supports Smart Tags<\/a><\/li>\n<li><a href=\"#inserting-a-smart-tag\">Inserting a Smart Tag<\/a><\/li>\n<li><a href=\"#finding-the-right-smart-tag\">Finding the Right Smart Tag<\/a><\/li>\n<\/ul>\n<p>Before you get started, make sure <a href=\"https:\/\/wpcode.com\/docs\/how-to-install-the-wpcode-plugin\/\" target=\"_blank\">WPCode is installed and activated<\/a> on your WordPress site.<\/p>\n<h2 id=\"what-are-smart-tags\">What Are Smart Tags?<\/h2>\n<p>A smart tag is a short placeholder wrapped in curly braces, such as <code>{first_name}<\/code>. When WPCode runs your snippet, it swaps each placeholder for the matching value from your site. That means <code>{first_name}<\/code> becomes the first name of whoever is viewing the page.<\/p>\n<p>Smart tags save you the trouble of writing the code that looks those values up. They work in HTML, Text, JavaScript, and Universal snippets. A single snippet can hold as many tags as you like.<\/p>\n<p>When a value isn&#8217;t available, WPCode replaces the tag with nothing rather than printing the placeholder itself. That happens with a visitor&#8217;s first name when nobody is logged in.<\/p>\n<h2 id=\"creating-a-snippet-that-supports-smart-tags\">Creating a Snippet That Supports Smart Tags<\/h2>\n<p>To get started, we&#8217;ll build a snippet in one of the types that support smart tags.<\/p>\n<p>From your WordPress admin sidebar, go to <strong>Code Snippets &raquo; + Add Snippet<\/strong>.<\/p>\n<p><img decoding=\"async\" style=\"display:block;margin:1.5rem auto\" class=\"aligncenter\" src=\"https:\/\/wpcode.com\/wp-content\/uploads\/2026\/10\/wpcode-smart-tags-step_01_navigate.webp?v=1f715409\" alt=\"Opening the Add Snippet screen from the Code Snippets menu in the WordPress admin sidebar\"><\/p>\n<p>On the Snippet Library tab, hover over the Add Your Custom Code card. Then click <strong>+ Add Custom Snippet<\/strong>.<\/p>\n<p><img decoding=\"async\" style=\"display:block;margin:1.5rem auto\" class=\"aligncenter\" src=\"https:\/\/wpcode.com\/wp-content\/uploads\/2026\/10\/wpcode-smart-tags-step_02_add_custom_snippet.webp?v=a0af3637\" alt=\"An arrow pointing at the + Add Custom Snippet button on the Add Your Custom Code card, revealed on hover\"><\/p>\n<p>WPCode then asks which kind of snippet you&#8217;re building. For this example, click <strong>HTML Snippet<\/strong>.<\/p>\n<p><img decoding=\"async\" style=\"display:block;margin:1.5rem auto\" class=\"aligncenter\" src=\"https:\/\/wpcode.com\/wp-content\/uploads\/2026\/10\/wpcode-smart-tags-step_03_choose_html_snippet.webp?v=a9bd69f9\" alt=\"An arrow pointing at the HTML Snippet card in the snippet type picker, beside the Text Snippet, Blocks Snippet, and CSS Snippet cards\"><\/p>\n<p>WPCode opens the snippet editor, ready for you to add your code.<\/p>\n<div class=\"alert alert-info\">\n<p><strong>Note:<\/strong> Not sure which type fits your code? Our guide on <a href=\"https:\/\/wpcode.com\/docs\/what-type-of-snippet-do-i-need\/\" target=\"_blank\">what type of snippet you need<\/a> walks through all eight options.<\/p>\n<\/div>\n<h2 id=\"inserting-a-smart-tag\">Inserting a Smart Tag<\/h2>\n<p>WPCode keeps the full list of smart tags inside the snippet editor. That means you never have to type a tag from memory.<\/p>\n<p>Start by adding your own code. Our example is a short welcome message that greets the visitor by name: <code>&lt;div class=\"welcome-message\"&gt;&lt;p&gt;Welcome back, &lt;\/p&gt;&lt;\/div&gt;<\/code><\/p>\n<p>Then click in the code editor at the spot where you want the value to appear. WPCode inserts each tag at your cursor.<\/p>\n<p>Above the code editor, in the Code Preview row just to the left of the Code Type dropdown, click <strong>Show Smart Tags<\/strong>.<\/p>\n<p><img decoding=\"async\" style=\"display:block;margin:1.5rem auto\" class=\"aligncenter\" src=\"https:\/\/wpcode.com\/wp-content\/uploads\/2026\/10\/wpcode-smart-tags-step_04_show_smart_tags.webp?v=6e7d59c9\" alt=\"An arrow pointing at the Show Smart Tags button above the Code Preview editor\"><\/p>\n<p>The tag picker opens below the button, with a search box at the top and the tag list underneath. The list scrolls, so every tag is reachable from here. Each entry shows the tag itself alongside a short description of the value it returns.<\/p>\n<p><img decoding=\"async\" style=\"display:block;margin:1.5rem auto\" class=\"aligncenter\" src=\"https:\/\/wpcode.com\/wp-content\/uploads\/2026\/10\/wpcode-smart-tags-step_05_smart_tags_picker.webp?v=e392cd79\" alt=\"The smart tag picker open beside the code editor, listing tags such as id, permalink, title, and first_name with their descriptions\"><\/p>\n<p>With 23 tags in the list, the quickest way to find one is to type into the search box. Searching for &#8220;name&#8221; leaves only the four tags that return a name.<\/p>\n<p>Then click the tag you want, such as <strong><code>{first_name}<\/code><\/strong>.<\/p>\n<p><img decoding=\"async\" style=\"display:block;margin:1.5rem auto\" class=\"aligncenter\" src=\"https:\/\/wpcode.com\/wp-content\/uploads\/2026\/10\/wpcode-smart-tags-step_06_search_smart_tags.webp?v=9fbee193\" alt=\"An arrow pointing at the first_name tag in the smart tag picker, filtered by the search term name\"><\/p>\n<p>WPCode drops the tag in at your cursor. The picker closes on its own.<\/p>\n<p><img decoding=\"async\" style=\"display:block;margin:1.5rem auto\" class=\"aligncenter\" src=\"https:\/\/wpcode.com\/wp-content\/uploads\/2026\/10\/wpcode-smart-tags-step_07_tag_inserted.webp?v=7bb29c60\" alt=\"The first_name smart tag inserted inside a paragraph tag in the WPCode code editor\"><\/p>\n<p>Next, give your snippet a name at the top of the screen. Then, when you&#8217;re happy with the code, click <strong>Save Snippet<\/strong>.<\/p>\n<p><img decoding=\"async\" style=\"display:block;margin:1.5rem auto\" class=\"aligncenter\" src=\"https:\/\/wpcode.com\/wp-content\/uploads\/2026\/10\/wpcode-smart-tags-step_08_save_snippet.webp?v=3cb535ef\" alt=\"An arrow pointing at the Save Snippet button at the top of the snippet editor\"><\/p>\n<p>Your snippet is saved. Once the snippet is active, WPCode swaps each tag for its value every time the snippet runs.<\/p>\n<h2 id=\"finding-the-right-smart-tag\">Finding the Right Smart Tag<\/h2>\n<p>WPCode ships with 23 smart tags, all listed in the picker. Here&#8217;s what each one returns.<\/p>\n<ul>\n<li><code>{id}<\/code>: the ID of the current post or page.<\/li>\n<li><code>{permalink}<\/code>: the full URL of the current post or page.<\/li>\n<li><code>{title}<\/code>: the title of the current post or page.<\/li>\n<li><code>{excerpt}<\/code>: the excerpt of the current post. When no excerpt is set, WPCode trims the first 55 words of the content instead.<\/li>\n<li><code>{content}<\/code>: the content of the current post.<\/li>\n<li><code>{featured_image}<\/code>: the URL of the featured image.<\/li>\n<li><code>{categories}<\/code>: the categories the current post belongs to.<\/li>\n<li><code>{tags}<\/code>: the post tags, separated by commas.<\/li>\n<li><code>{date_published}<\/code>: the date the post was published, in your site&#8217;s date format.<\/li>\n<li><code>{date_modified}<\/code>: the date the post was last changed, in your site&#8217;s date format.<\/li>\n<li><code>{email}<\/code>: the email address of the logged-in visitor.<\/li>\n<li><code>{first_name}<\/code>: the first name of the logged-in visitor.<\/li>\n<li><code>{last_name}<\/code>: the last name of the logged-in visitor.<\/li>\n<li><code>{custom_field}<\/code>: the value of a custom field you name.<\/li>\n<li><code>{author_id}<\/code>: the ID of the post author.<\/li>\n<li><code>{author_name}<\/code>: the display name of the post author.<\/li>\n<li><code>{author_url}<\/code>: the URL of the post author&#8217;s archive page.<\/li>\n<li><code>{author_bio}<\/code>: the biography from the post author&#8217;s profile.<\/li>\n<li><code>{site_name}<\/code>: the name of your website.<\/li>\n<li><code>{site_url}<\/code>: the home URL of your website.<\/li>\n<li><code>{post_type}<\/code>: the name of the post type, such as &#8220;Post&#8221; or &#8220;Page&#8221;.<\/li>\n<li><code>{login_url}<\/code>: the URL of your login page.<\/li>\n<li><code>{logout_url}<\/code>: the URL that logs the visitor out.<\/li>\n<\/ul>\n<p>The picker grows as your site does. If you add <a href=\"https:\/\/wpcode.com\/docs\/shortcode-attributes\/\" target=\"_blank\">shortcode attributes<\/a> to a snippet, each one joins the list as <code>{attr_yourkey}<\/code> under a Shortcode Attributes heading. That puts an attribute&#8217;s value one click away in your code.<\/p>\n<p>That&#8217;s it! You now have a snippet that pulls live values from your site through smart tags. Next, take a look at our <a href=\"https:\/\/wpcode.com\/docs\/a-complete-guide-to-snippet-locations\/\" target=\"_blank\">complete guide to snippet locations<\/a> to choose exactly where your snippet runs.<\/p>\n<h2>Frequently Asked Questions<\/h2>\n<p>Below, we&#8217;ve answered some of the most common questions about using smart tags in WPCode snippets.<\/p>\n<h3 id=\"which-snippet-types-can-use-smart-tags\">Which snippet types can use smart tags?<\/h3>\n<p>Smart tags work in HTML, Text, JavaScript, and Universal snippets. PHP snippets read the same values with regular PHP functions instead, so the picker isn&#8217;t shown for them. The button is also hidden for CSS and Blocks snippets. On SCSS snippets the button does appear, so stick to the four types above if you want the tag replaced with a real value.<\/p>\n<h3 id=\"can-i-pull-a-value-from-a-custom-field\">Can I pull a value from a custom field?<\/h3>\n<p>Yes. In the picker, choose <code>{custom_field}<\/code> and it arrives in your code as <code>{custom_field=\"meta_key\"}<\/code>. Replace <code>meta_key<\/code> with the name of the field you want. WPCode then returns that field&#8217;s value for the current post. See <a href=\"https:\/\/www.wpbeginner.com\/wp-tutorials\/wordpress-custom-fields-101-tips-tricks-and-hacks\/\" target=\"_blank\" rel=\"nofollow\">WordPress Custom Fields 101<\/a> for a step-by-step guide to creating custom fields and finding a field&#8217;s name.<\/p>\n<h3 id=\"what-happens-if-a-smart-tag-has-no-value\">What happens if a smart tag has no value?<\/h3>\n<p>WPCode replaces the tag with an empty value. If a visitor isn&#8217;t logged in, for example, <code>{first_name}<\/code> resolves to nothing at all, so your visitors never see the placeholder text. A tag WPCode doesn&#8217;t recognize stays exactly as you typed it, which makes a misspelled tag easy to spot.<\/p>\n<h3 id=\"do-other-plugins-add-their-own-smart-tags\">Do other plugins add their own smart tags?<\/h3>\n<p>Yes. WooCommerce, Easy Digital Downloads, Yoast SEO, All in One SEO, MemberPress, and MemberPress Courses each add a group of their own tags to the picker. Those groups appear automatically once the plugin is active on your site.<\/p>\n<h3 id=\"can-i-use-smart-tags-in-page-specific-scripts\">Can I use smart tags in page-specific scripts?<\/h3>\n<p>Yes. The WPCode Page Scripts box on any post or page carries the same picker above each of its header and footer fields. Tags work there in exactly the same way.<\/p>\n<h3 id=\"are-smart-tag-values-safe-to-output\">Are smart tag values safe to output?<\/h3>\n<p>Yes. WPCode escapes each value for the place it lands in, whether that&#8217;s an HTML attribute, a script block, or the body of your markup. The surrounding code stays valid whatever the value turns out to be.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Would you like your snippets to greet each visitor by name, or print the current post title without you writing any code? All you need is a snippet to work in and a few clicks in the code editor. In this guide, we&#8217;ll walk you through inserting smart tags into a WPCode snippet. Requirements: Smart [&hellip;]<\/p>\n","protected":false},"author":2,"template":"","class_list":["post-2094","wpcode_doc","type-wpcode_doc","status-publish","hentry","wpcode_doc_category-functionality"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO Pro 5.0.4 - aioseo.com -->\n\t<meta name=\"description\" content=\"Would you like your snippets to greet each visitor by name, or print the current post title without you writing any code? All you need is a snippet to work in and a few clicks in the code editor. In this guide, we&#039;ll walk you through inserting smart tags into a WPCode snippet. Requirements: Smart\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Mircea Sandu\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/wpcode.com\/docs\/smart-tags\/\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO Pro (AIOSEO) 5.0.4\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"WPCode - The Best WordPress Code Snippets Plugin\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to Use Smart Tags in WPCode\" \/>\n\t\t<meta property=\"og:description\" content=\"Would you like your snippets to greet each visitor by name, or print the current post title without you writing any code? All you need is a snippet to work in and a few clicks in the code editor. In this guide, we&#039;ll walk you through inserting smart tags into a WPCode snippet. Requirements: Smart\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/wpcode.com\/docs\/smart-tags\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/wpcode.com\/wp-content\/uploads\/2023\/08\/wpcode-featured-image-2.jpg?wsr\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/wpcode.com\/wp-content\/uploads\/2023\/08\/wpcode-featured-image-2.jpg?wsr\" \/>\n\t\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-05-30T08:31:58+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-10-05T13:50:25+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to Use Smart Tags in WPCode\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Would you like your snippets to greet each visitor by name, or print the current post title without you writing any code? All you need is a snippet to work in and a few clicks in the code editor. In this guide, we&#039;ll walk you through inserting smart tags into a WPCode snippet. Requirements: Smart\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/wpcode.com\/wp-content\/uploads\/2023\/08\/wpcode-featured-image-2.jpg?wsr\" \/>\n\t\t<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t\t<meta name=\"twitter:data1\" content=\"Mircea Sandu\" \/>\n\t\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/docs\\\/smart-tags\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wpcode.com\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/docs\\\/#listItem\",\"name\":\"Docs\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/docs\\\/#listItem\",\"position\":2,\"name\":\"Docs\",\"item\":\"https:\\\/\\\/wpcode.com\\\/docs\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/categories\\\/docs\\\/functionality\\\/#listItem\",\"name\":\"Functionality\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/categories\\\/docs\\\/functionality\\\/#listItem\",\"position\":3,\"name\":\"Functionality\",\"item\":\"https:\\\/\\\/wpcode.com\\\/categories\\\/docs\\\/functionality\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/docs\\\/smart-tags\\\/#listItem\",\"name\":\"Using Smart Tags\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/docs\\\/#listItem\",\"name\":\"Docs\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/docs\\\/smart-tags\\\/#listItem\",\"position\":4,\"name\":\"Using Smart Tags\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/categories\\\/docs\\\/functionality\\\/#listItem\",\"name\":\"Functionality\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/#organization\",\"name\":\"WPCode\",\"description\":\"The Best WordPress Code Snippets Plugin\",\"url\":\"https:\\\/\\\/wpcode.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/wpcode.com\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/logo-wpcode.svg?wsr\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/docs\\\/smart-tags\\\/#organizationLogo\"},\"image\":{\"@id\":\"https:\\\/\\\/wpcode.com\\\/docs\\\/smart-tags\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/author\\\/msanduawesomemotive-com\\\/#author\",\"url\":\"https:\\\/\\\/wpcode.com\\\/author\\\/msanduawesomemotive-com\\\/\",\"name\":\"Mircea Sandu\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/docs\\\/smart-tags\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/858afa2a871931eea37bc916f2608b8af2e53953f981b2c8cc72cac52b5570ea?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Mircea Sandu\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/docs\\\/smart-tags\\\/#webpage\",\"url\":\"https:\\\/\\\/wpcode.com\\\/docs\\\/smart-tags\\\/\",\"name\":\"How to Use Smart Tags in WPCode\",\"description\":\"Would you like your snippets to greet each visitor by name, or print the current post title without you writing any code? All you need is a snippet to work in and a few clicks in the code editor. In this guide, we'll walk you through inserting smart tags into a WPCode snippet. Requirements: Smart\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wpcode.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wpcode.com\\\/docs\\\/smart-tags\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/wpcode.com\\\/author\\\/msanduawesomemotive-com\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/wpcode.com\\\/author\\\/msanduawesomemotive-com\\\/#author\"},\"datePublished\":\"2023-05-30T08:31:58-04:00\",\"dateModified\":\"2026-10-05T09:50:25-04:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wpcode.com\\\/#website\",\"url\":\"https:\\\/\\\/wpcode.com\\\/\",\"name\":\"WPCode\",\"description\":\"The Best WordPress Code Snippets Plugin\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/wpcode.com\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO Pro -->\r\n\t\t<title>How to Use Smart Tags in WPCode<\/title>\n\n","aioseo_head_json":{"title":"How to Use Smart Tags in WPCode","description":"Would you like your snippets to greet each visitor by name, or print the current post title without you writing any code? All you need is a snippet to work in and a few clicks in the code editor. In this guide, we'll walk you through inserting smart tags into a WPCode snippet. Requirements: Smart","canonical_url":"https:\/\/wpcode.com\/docs\/smart-tags\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/wpcode.com\/docs\/smart-tags\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/wpcode.com\/#listItem","position":1,"name":"Home","item":"https:\/\/wpcode.com\/","nextItem":{"@type":"ListItem","@id":"https:\/\/wpcode.com\/docs\/#listItem","name":"Docs"}},{"@type":"ListItem","@id":"https:\/\/wpcode.com\/docs\/#listItem","position":2,"name":"Docs","item":"https:\/\/wpcode.com\/docs\/","nextItem":{"@type":"ListItem","@id":"https:\/\/wpcode.com\/categories\/docs\/functionality\/#listItem","name":"Functionality"},"previousItem":{"@type":"ListItem","@id":"https:\/\/wpcode.com\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/wpcode.com\/categories\/docs\/functionality\/#listItem","position":3,"name":"Functionality","item":"https:\/\/wpcode.com\/categories\/docs\/functionality\/","nextItem":{"@type":"ListItem","@id":"https:\/\/wpcode.com\/docs\/smart-tags\/#listItem","name":"Using Smart Tags"},"previousItem":{"@type":"ListItem","@id":"https:\/\/wpcode.com\/docs\/#listItem","name":"Docs"}},{"@type":"ListItem","@id":"https:\/\/wpcode.com\/docs\/smart-tags\/#listItem","position":4,"name":"Using Smart Tags","previousItem":{"@type":"ListItem","@id":"https:\/\/wpcode.com\/categories\/docs\/functionality\/#listItem","name":"Functionality"}}]},{"@type":"Organization","@id":"https:\/\/wpcode.com\/#organization","name":"WPCode","description":"The Best WordPress Code Snippets Plugin","url":"https:\/\/wpcode.com\/","logo":{"@type":"ImageObject","url":"https:\/\/wpcode.com\/wp-content\/uploads\/2022\/11\/logo-wpcode.svg?wsr","@id":"https:\/\/wpcode.com\/docs\/smart-tags\/#organizationLogo"},"image":{"@id":"https:\/\/wpcode.com\/docs\/smart-tags\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/wpcode.com\/author\/msanduawesomemotive-com\/#author","url":"https:\/\/wpcode.com\/author\/msanduawesomemotive-com\/","name":"Mircea Sandu","image":{"@type":"ImageObject","@id":"https:\/\/wpcode.com\/docs\/smart-tags\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/858afa2a871931eea37bc916f2608b8af2e53953f981b2c8cc72cac52b5570ea?s=96&d=mm&r=g","width":96,"height":96,"caption":"Mircea Sandu"}},{"@type":"WebPage","@id":"https:\/\/wpcode.com\/docs\/smart-tags\/#webpage","url":"https:\/\/wpcode.com\/docs\/smart-tags\/","name":"How to Use Smart Tags in WPCode","description":"Would you like your snippets to greet each visitor by name, or print the current post title without you writing any code? All you need is a snippet to work in and a few clicks in the code editor. In this guide, we'll walk you through inserting smart tags into a WPCode snippet. Requirements: Smart","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/wpcode.com\/#website"},"breadcrumb":{"@id":"https:\/\/wpcode.com\/docs\/smart-tags\/#breadcrumblist"},"author":{"@id":"https:\/\/wpcode.com\/author\/msanduawesomemotive-com\/#author"},"creator":{"@id":"https:\/\/wpcode.com\/author\/msanduawesomemotive-com\/#author"},"datePublished":"2023-05-30T08:31:58-04:00","dateModified":"2026-10-05T09:50:25-04:00"},{"@type":"WebSite","@id":"https:\/\/wpcode.com\/#website","url":"https:\/\/wpcode.com\/","name":"WPCode","description":"The Best WordPress Code Snippets Plugin","inLanguage":"en-US","publisher":{"@id":"https:\/\/wpcode.com\/#organization"}}]},"og:locale":"en_US","og:site_name":"WPCode - The Best WordPress Code Snippets Plugin","og:type":"article","og:title":"How to Use Smart Tags in WPCode","og:description":"Would you like your snippets to greet each visitor by name, or print the current post title without you writing any code? All you need is a snippet to work in and a few clicks in the code editor. In this guide, we'll walk you through inserting smart tags into a WPCode snippet. Requirements: Smart","og:url":"https:\/\/wpcode.com\/docs\/smart-tags\/","og:image":"https:\/\/wpcode.com\/wp-content\/uploads\/2023\/08\/wpcode-featured-image-2.jpg?wsr","og:image:secure_url":"https:\/\/wpcode.com\/wp-content\/uploads\/2023\/08\/wpcode-featured-image-2.jpg?wsr","og:image:width":2400,"og:image:height":1260,"article:published_time":"2023-05-30T08:31:58+00:00","article:modified_time":"2026-10-05T13:50:25+00:00","twitter:card":"summary_large_image","twitter:title":"How to Use Smart Tags in WPCode","twitter:description":"Would you like your snippets to greet each visitor by name, or print the current post title without you writing any code? All you need is a snippet to work in and a few clicks in the code editor. In this guide, we'll walk you through inserting smart tags into a WPCode snippet. Requirements: Smart","twitter:image":"https:\/\/wpcode.com\/wp-content\/uploads\/2023\/08\/wpcode-featured-image-2.jpg?wsr","twitter:label1":"Written by","twitter:data1":"Mircea Sandu","twitter:label2":"Est. reading time","twitter:data2":"6 minutes"},"aioseo_meta_data":{"post_id":"2094","title":"How to Use Smart Tags in WPCode","description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":true,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"WebPage","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"seo_analyzer_scan_date":"2026-10-05 13:50:57","breadcrumb_settings":null,"limit_modified_date":false,"open_ai":"{\"title\":{\"suggestions\":[],\"usage\":0},\"description\":{\"suggestions\":[],\"usage\":0}}","ai":null,"created":"2023-05-29 12:17:02","updated":"2026-10-09 09:39:07","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/wpcode.com\/\" title=\"Home\">Home<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/wpcode.com\/docs\/\" title=\"Docs\">Docs<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/wpcode.com\/categories\/docs\/functionality\/\" title=\"Functionality\">Functionality<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\tUsing Smart Tags\n<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/wpcode.com\/"},{"label":"Docs","link":"https:\/\/wpcode.com\/docs\/"},{"label":"Functionality","link":"https:\/\/wpcode.com\/categories\/docs\/functionality\/"},{"label":"Using Smart Tags","link":"https:\/\/wpcode.com\/docs\/smart-tags\/"}],"_links":{"self":[{"href":"https:\/\/wpcode.com\/wp-json\/wp\/v2\/wpcode_doc\/2094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpcode.com\/wp-json\/wp\/v2\/wpcode_doc"}],"about":[{"href":"https:\/\/wpcode.com\/wp-json\/wp\/v2\/types\/wpcode_doc"}],"author":[{"embeddable":true,"href":"https:\/\/wpcode.com\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":4,"href":"https:\/\/wpcode.com\/wp-json\/wp\/v2\/wpcode_doc\/2094\/revisions"}],"predecessor-version":[{"id":7315,"href":"https:\/\/wpcode.com\/wp-json\/wp\/v2\/wpcode_doc\/2094\/revisions\/7315"}],"wp:attachment":[{"href":"https:\/\/wpcode.com\/wp-json\/wp\/v2\/media?parent=2094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}