skip to Main Content

The Divi theme by default comes with only 4 possible social media icons:
Facebook, Twitter, Google+, and RSS.

This can be extended, with a bit of coding in includes/social_icons.php in your child theme to another possible 10:
Pinterest, LinkedIn, Tumblr, Skype, Instagram, Flikr, MySpace, Dribble, YouTube, and Vimeo.

I need to add a TripAdvisor icon, which unfortunately isn’t in that extended list..

3

Answers


  1. Chosen as BEST ANSWER

    I used iconsdb.com to create two icons of the right size and colour. Add the hex code for the color in the top right (I chose 7E7E7E and A0A0A0), click Go, then in Search for Icons type tripadvisor, then click on the tripadvisor icon to get to the download page.

    EDIT: It looks like iconsdb.com no longer has the Tripadvisor icon. However you can still find lots of versions if you Google "Tripadvisor icon SVG".

    Choose .PNG custom size of 36*36px for both and then crop down in Photoshop to 26px high.

    Once you’ve uploaded the icons to your server, open the social_icons.php file in the includes folder of your child theme. Just before the

        </ul>
    

    tag near the end of the file, add the following code:

    <li class="et-social-icon et-social-tripadvisor"><a href="YOUR TRIPADVISOR REVIEWS URL" class="icon"><span><?php esc_html_e( 'tripadvisor', 'Divi' ); ?></span></a></li>
    

    Then add the following to style.css in your child theme (or use Divi Booster to add this custom CSS for the whole site)...

    .et-social-tripadvisor a {
    display: block;
    margin-left: 11px;
    }
    
    .et-social-tripadvisor a:hover img {
    opacity: 0;
    }
    
    .et-social-tripadvisor a:hover {
    background: rgba(0, 0, 0, 0) url("<PATH TO YOUR HOVER STATE ICON>") no-repeat scroll 0 0 / 100% auto;
    display: block;
    }
    
    .et-social-tripadvisor a.icon::before {
        content: url("<PATH TO YOUR NORMAL STATE ICON>");
    }
    

  2. I think is better this method because image size get autoadjustment and is not necessary to premade two states icons or add extra css: (in conclusion, much easier, clean and efficient)

    Before </ul> copy this code:

    <li class="et-social-icon">
    <a href="https://www.google.es" class="icon">
    <i class="fab fa-tripadvisor"></i>
    </a>
    </li>
    

    (change https://www.google.es with your tripadvisor’s url)

    Then into dashboard go to Divi>Theme options>Integration. On “Blog Head Code” copy this:

    <script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
    

    Save Changes, refresh your homepage.

    Enjoy!

    Login or Signup to reply.
  3. in case anyone else finds this while trying to figure out why their tripadvisor icon is no longer working.
    Turns out that tripadvisor demanded that font awesome removed the tripadvisor icon from the library.
    Why they would do this, I have no idea, but I have had some very unsavory dealings with Tripadvisor customer service, so it doesn’t surprise they would do something like this.

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