If the Similar.AI WordPress plugin does not work, follow the steps below to integrate Similar AI API into your WordPress site using JavaScript (JS) for internal linking:

1. With WPCode Plugin

Step 1: Import JavaScript into the WordPress Footer

Step 2: Embed HTML Code within Post Editor

  1. Create a Code Block:

  2. Paste HTML Code:

3. Re-paste the HTML code:

image (9).png

add HTML code into the post and the links will be displayed in the post like below.

image (8).png


2. Inject JavaScript to WordPress template

  1. Add JavaScript in your WordPress footer, e.g. for the similar.ai website, it’s /wp-admin/theme-editor.php?file=footer.php
  2. Add the JavaScript script
  3. add <div id="similarai-relatedSearches"></div>