{"id":7697,"date":"2025-02-28T11:55:17","date_gmt":"2025-02-28T11:55:17","guid":{"rendered":"https:\/\/www.leadshook.com\/help\/?p=7697"},"modified":"2025-02-28T11:55:19","modified_gmt":"2025-02-28T11:55:19","slug":"how-to-create-a-custom-progress-bar-with-percentage","status":"publish","type":"post","link":"https:\/\/www.leadshook.com\/help\/how-to-create-a-custom-progress-bar-with-percentage\/","title":{"rendered":"How to create a custom progress bar with percentage"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Our built-in progress bar does not display a percentage. This guide provides instructions on creating a custom progress bar with a percentage display, allowing you to manually control the progress on individual nodes.<\/h4>\n\n\n\n<p><strong>Step 1: Go to Appearance settings > Header and Footer > enable &#8220;Display Header&#8221; and add this code under Content Below Header.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;div class=\"progress-container\">\n  &lt;div class=\"progress-bar\">&lt;\/div>\n  &lt;div class=\"progress-text\">&lt;\/div>\n&lt;\/div><\/code><\/pre>\n\n\n\n<p><strong>Step 2: Go to DT level scripts and add this CSS above &lt;\/head> section<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;style>\n.progress-container {\n  width: 100%;\n  background-color: #f0f0f0;\n  border-radius: 10px;\n  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);\n  overflow: hidden;\n  position: relative;\n  height: 30px;\n  margin: 20px 0;\n  \/* Remove any potential padding *\/\n  padding: 0;\n}\n\n.progress-bar {\n  height: 100%;\n  width: var(--progress-value, 0%);\n  background-image: linear-gradient(45deg,\n    rgba(255, 255, 255, 0.15) 25%,\n    transparent 25%,\n    transparent 50%,\n    rgba(255, 255, 255, 0.15) 50%,\n    rgba(255, 255, 255, 0.15) 75%,\n    transparent 75%,\n    transparent);\n  background-color: #4CAF50;\n  background-size: 40px 40px;\n  border-radius: 10px; \/* Match the container's border-radius *\/\n  transition: width 0.5s ease;\n  animation: progress-bar-stripes 1s linear infinite;\n  \/* Fix positioning *\/\n  position: absolute;\n  left: 0;\n  top: 0;\n  \/* Remove any borders or outlines *\/\n  border: none;\n  outline: none;\n  \/* Ensure no margin *\/\n  margin: 0;\n}\n\n@keyframes progress-bar-stripes {\n  from {\n    background-position: 0 0;\n  }\n  to {\n    background-position: 40px 0;\n  }\n}\n\n.progress-text {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n  color: #333;\n  font-weight: bold;\n  text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);\n  z-index: 10;\n  font-family: 'Courier New', monospace;\n}\n\n\/* Use the content property to display the percentage text *\/\n.progress-text::after {\n  content: var(--progress-text, '0%');\n}\n  &lt;\/style><\/code><\/pre>\n\n\n\n<p><strong>Step 3: In your individual node&#8217;s content, go to Source code editor and add this code:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;p>\n&lt;style type=\"text\/css\">:root {\n    --progress-value: 25%; \/* Change this value for each page *\/\n    --progress-text: '25%'; \/* Must match the value above *\/\n  }\n&lt;\/style>\n&lt;\/p><\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Our built-in progress bar does not display a percentage. This guide provides instructions on creating a custom progress bar with a percentage display, allowing you to manually control the progress on individual nodes. Step 1: Go to Appearance settings > Header and Footer > enable &#8220;Display Header&#8221; and add this code under Content Below Header. [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1086,49,905],"class_list":["post-7697","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-custom-code","tag-progress","tag-progress-bar"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to create a custom progress bar with percentage - LeadsHook Knowledge Base<\/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:\/\/www.leadshook.com\/help\/how-to-create-a-custom-progress-bar-with-percentage\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to create a custom progress bar with percentage - LeadsHook Knowledge Base\" \/>\n<meta property=\"og:description\" content=\"Our built-in progress bar does not display a percentage. This guide provides instructions on creating a custom progress bar with a percentage display, allowing you to manually control the progress on individual nodes. Step 1: Go to Appearance settings &gt; Header and Footer &gt; enable &#8220;Display Header&#8221; and add this code under Content Below Header. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.leadshook.com\/help\/how-to-create-a-custom-progress-bar-with-percentage\/\" \/>\n<meta property=\"og:site_name\" content=\"LeadsHook Knowledge Base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/leadshook\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-02-28T11:55:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-28T11:55:19+00:00\" \/>\n<meta name=\"author\" content=\"Von\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@leadshook\" \/>\n<meta name=\"twitter:site\" content=\"@leadshook\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Von\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-create-a-custom-progress-bar-with-percentage\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-create-a-custom-progress-bar-with-percentage\\\/\"},\"author\":{\"name\":\"Von\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/person\\\/646557edf0c248393812c53a8ce7fe8b\"},\"headline\":\"How to create a custom progress bar with percentage\",\"datePublished\":\"2025-02-28T11:55:17+00:00\",\"dateModified\":\"2025-02-28T11:55:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-create-a-custom-progress-bar-with-percentage\\\/\"},\"wordCount\":90,\"publisher\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#organization\"},\"keywords\":[\"custom code\",\"progress\",\"progress bar\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-create-a-custom-progress-bar-with-percentage\\\/\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-create-a-custom-progress-bar-with-percentage\\\/\",\"name\":\"How to create a custom progress bar with percentage - LeadsHook Knowledge Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#website\"},\"datePublished\":\"2025-02-28T11:55:17+00:00\",\"dateModified\":\"2025-02-28T11:55:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-create-a-custom-progress-bar-with-percentage\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-create-a-custom-progress-bar-with-percentage\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-create-a-custom-progress-bar-with-percentage\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to create a custom progress bar with percentage\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#website\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/\",\"name\":\"LeadsHook Knowledge Base\",\"description\":\"LeadsHook Training &amp; Technical Help\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#organization\",\"name\":\"LeadsHook\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/leadshook-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/leadshook-logo.png\",\"width\":350,\"height\":83,\"caption\":\"LeadsHook\"},\"image\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/leadshook\\\/\",\"https:\\\/\\\/x.com\\\/leadshook\",\"https:\\\/\\\/www.linkedin.com\\\/showcase\\\/leadshook\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/person\\\/646557edf0c248393812c53a8ce7fe8b\",\"name\":\"Von\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8c9fa6fa4af8da43fe4d69a7bddaddadc9d1f7fbaf9363aee7d9187dee60cd?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8c9fa6fa4af8da43fe4d69a7bddaddadc9d1f7fbaf9363aee7d9187dee60cd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8c9fa6fa4af8da43fe4d69a7bddaddadc9d1f7fbaf9363aee7d9187dee60cd?s=96&d=mm&r=g\",\"caption\":\"Von\"},\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/author\\\/voncs-leadshook-com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to create a custom progress bar with percentage - LeadsHook Knowledge Base","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.leadshook.com\/help\/how-to-create-a-custom-progress-bar-with-percentage\/","og_locale":"en_US","og_type":"article","og_title":"How to create a custom progress bar with percentage - LeadsHook Knowledge Base","og_description":"Our built-in progress bar does not display a percentage. This guide provides instructions on creating a custom progress bar with a percentage display, allowing you to manually control the progress on individual nodes. Step 1: Go to Appearance settings > Header and Footer > enable &#8220;Display Header&#8221; and add this code under Content Below Header. [&hellip;]","og_url":"https:\/\/www.leadshook.com\/help\/how-to-create-a-custom-progress-bar-with-percentage\/","og_site_name":"LeadsHook Knowledge Base","article_publisher":"https:\/\/www.facebook.com\/leadshook\/","article_published_time":"2025-02-28T11:55:17+00:00","article_modified_time":"2025-02-28T11:55:19+00:00","author":"Von","twitter_card":"summary_large_image","twitter_creator":"@leadshook","twitter_site":"@leadshook","twitter_misc":{"Written by":"Von","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.leadshook.com\/help\/how-to-create-a-custom-progress-bar-with-percentage\/#article","isPartOf":{"@id":"https:\/\/www.leadshook.com\/help\/how-to-create-a-custom-progress-bar-with-percentage\/"},"author":{"name":"Von","@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/person\/646557edf0c248393812c53a8ce7fe8b"},"headline":"How to create a custom progress bar with percentage","datePublished":"2025-02-28T11:55:17+00:00","dateModified":"2025-02-28T11:55:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.leadshook.com\/help\/how-to-create-a-custom-progress-bar-with-percentage\/"},"wordCount":90,"publisher":{"@id":"https:\/\/www.leadshook.com\/help\/#organization"},"keywords":["custom code","progress","progress bar"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.leadshook.com\/help\/how-to-create-a-custom-progress-bar-with-percentage\/","url":"https:\/\/www.leadshook.com\/help\/how-to-create-a-custom-progress-bar-with-percentage\/","name":"How to create a custom progress bar with percentage - LeadsHook Knowledge Base","isPartOf":{"@id":"https:\/\/www.leadshook.com\/help\/#website"},"datePublished":"2025-02-28T11:55:17+00:00","dateModified":"2025-02-28T11:55:19+00:00","breadcrumb":{"@id":"https:\/\/www.leadshook.com\/help\/how-to-create-a-custom-progress-bar-with-percentage\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.leadshook.com\/help\/how-to-create-a-custom-progress-bar-with-percentage\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.leadshook.com\/help\/how-to-create-a-custom-progress-bar-with-percentage\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.leadshook.com\/help\/"},{"@type":"ListItem","position":2,"name":"How to create a custom progress bar with percentage"}]},{"@type":"WebSite","@id":"https:\/\/www.leadshook.com\/help\/#website","url":"https:\/\/www.leadshook.com\/help\/","name":"LeadsHook Knowledge Base","description":"LeadsHook Training &amp; Technical Help","publisher":{"@id":"https:\/\/www.leadshook.com\/help\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.leadshook.com\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.leadshook.com\/help\/#organization","name":"LeadsHook","url":"https:\/\/www.leadshook.com\/help\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/logo\/image\/","url":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2018\/12\/leadshook-logo.png","contentUrl":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2018\/12\/leadshook-logo.png","width":350,"height":83,"caption":"LeadsHook"},"image":{"@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/leadshook\/","https:\/\/x.com\/leadshook","https:\/\/www.linkedin.com\/showcase\/leadshook\/"]},{"@type":"Person","@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/person\/646557edf0c248393812c53a8ce7fe8b","name":"Von","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4d8c9fa6fa4af8da43fe4d69a7bddaddadc9d1f7fbaf9363aee7d9187dee60cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4d8c9fa6fa4af8da43fe4d69a7bddaddadc9d1f7fbaf9363aee7d9187dee60cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4d8c9fa6fa4af8da43fe4d69a7bddaddadc9d1f7fbaf9363aee7d9187dee60cd?s=96&d=mm&r=g","caption":"Von"},"url":"https:\/\/www.leadshook.com\/help\/author\/voncs-leadshook-com\/"}]}},"_links":{"self":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts\/7697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/comments?post=7697"}],"version-history":[{"count":1,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts\/7697\/revisions"}],"predecessor-version":[{"id":7698,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts\/7697\/revisions\/7698"}],"wp:attachment":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/media?parent=7697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/categories?post=7697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/tags?post=7697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}