Menu

Free to start / no card needed

WordPress

Add the badge to WordPress

WordPress gives you four places to put a script and three of them are wrong. Additional CSS cannot load one. Editing the parent theme's footer.php works until the next theme update overwrites it. Installing a header-and-footer plugin such as WPCode (formerly Insert Headers and Footers) adds a dependency to run one line. The two answers below are the ones that survive.

Where the code goes

Block themes (Twenty Twenty-Four and newer). Appearance → Editor → Patterns → Footer, then add a Custom HTML block and paste the line into it. Or, if you would rather edit the file, Tools → Theme File Editor → footer.html.

Classic themes: a child theme's functions.php. wp_enqueue_script is the correct WordPress way to add a script, and a child theme is what keeps your edit through a parent-theme update. The filter below adds the data-taksh attribute, which enqueue has no argument for.

Do not edit the parent theme. Editing footer.php directly works today and disappears the next time the theme updates, usually months later, with nothing connecting the two events. A child theme costs one folder and two files.

The code

Block themes: Custom HTML block in the footer template
<script src="https://maketaksh.com/badge.js" data-taksh="yourname" defer></script>
wp-content/themes/your-child-theme/functions.php
add_action('wp_enqueue_scripts', function () {
  wp_enqueue_script('taksh-badge', 'https://maketaksh.com/badge.js', [], null, true);
});

add_filter('script_loader_tag', function ($tag, $handle) {
  if ('taksh-badge' !== $handle) return $tag;
  return str_replace(' src=', ' data-taksh="yourname" defer src=', $tag);
}, 10, 2);

Swap yourname for your handle. It is the one in your dashboard.

A caching plugin is serving yesterday's HTML

WP Rocket, W3 Total Cache, LiteSpeed and most hosts' built-in caches will keep serving the page you had before you added the script. Purge the cache after the edit. If your cache also does JavaScript combining or deferring, exclude badge.js from it. Combiners rewrite the tag and drop unknown data- attributes, which removes the handle and leaves you with a script that loads and renders nothing.

Checking it worked

Load the published page and look at the bottom corner. If nothing is there, it is almost always one of four things, in order of how often: the handle has no projects in it yet; the handle is wrong; the platform stripped the tag, as described above; or a content blocker ate it, check the Network tab for badge.js.

Once it is live, the Analytics panel in your dashboard lists every site the badge has been seen on, from the first page load, which is the fastest way to confirm an install on a site you cannot easily open.

Other setups

Ghost · Squarespace · All twelve setups

What the badge is, and why cross-linking your own launches is worth doing at all: the short version.