skip to Main Content

I want to add a rel=”nofollow” attribute to several buttons displayed in my divi theme, however I do not find any such option on the dashboard is there any other way?

3

Answers


  1. Try to set ID to button and use script on divi theme integration settings page.

    <script>
    function myFunction() {
      var anchor = document.getElementById("myAnchor");
      var att = document.createAttribute("rel");
      att.value = "nofollow";
      anchor.setAttributeNode(att);
    }
    </script>
    
    Login or Signup to reply.
  2. Add the following to a Code Module on a page, or to the <head> of your website via the Divi > Theme Options > Integration section of wp-admin:

    <script>
    jQuery( document ).ready(function() {
        jQuery('a.et_pb_button').attr('rel','nofollow')
    });
    </script>
    
    Login or Signup to reply.
  3. You can achieve this in Divi without using code. It may be easier if you are new to WordPress 🙂

    Step 1: Click the cog icon (settings) on the button.

    Step 2: Navigate to advanced in the menu.

    Step 3: Scroll down and select attributes.

    Step 4: Tick nofollow then save item and update the page!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search