title: Create condition for Author bio Social Links
body: <p>I made Social Links for Author bio
  Now, I want to make a condition that whenever Social is added, the <code>&lt;ul class=&quot;social-area social-area-2&quot;&gt; &lt;/ul&gt;</code> class should be created. If no Social is added, the <code>social-area social-area-2</code> class should not be added.
  Thank you for helping me</p>
  <p>code file <code>author-bio.php</code></p>
  <pre><code>&lt;?php
  
      $facebook  = get_the_author_meta('facebook', $author_id);
      $twitter = get_the_author_meta('twitter', $author_id);
      
      if ( (bool) get_the_author_meta( 'description' ) &amp;&amp; (bool) get_theme_mod( 'show_author_bio', true ) ) : ?&gt;
      &lt;div class=&quot;author-area&quot;&gt;
      &lt;div class=&quot;media&quot;&gt;
          &lt;?php echo get_avatar( get_the_author_meta( 'ID' ), 120 ); ?&gt;
  
          &lt;div class=&quot;media-body align-self-center&quot;&gt;
              &lt;div class=&quot;text-author&quot;&gt;
                  &lt;h4&gt;
                      &lt;a class=&quot;author-link&quot;
                          href=&quot;&lt;?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?&gt;&quot; rel=&quot;author&quot;&gt;
                          &lt;?php printf(get_the_author() ); ?&gt;
                      &lt;/a&gt;
                  &lt;/h4&gt;
                  &lt;?php echo wp_kses_post( wpautop( get_the_author_meta( 'description' ) ) ); ?&gt;
              &lt;/div&gt;        
  
              &lt;ul class=&quot;social-area social-area-2&quot;&gt;
  
                  &lt;?php
                  if(!empty($facebook)) {
                  echo '&lt;li&gt;&lt;a title=&quot;Follow me on Facebook&quot; href=&quot;'.$facebook.'&quot;&gt;&lt;i class=&quot;fab fa-facebook-f&quot;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;'; }
                  ?&gt; 
  
                  &lt;?php   
                  if(!empty($twitter)) {
                  echo '&lt;li&gt;&lt;a title=&quot;Follow me on Twitter&quot; href=&quot;'.$twitter.'&quot;&gt;&lt;i class=&quot;fab fa-twitter&quot;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;'; }
                  ?&gt;
  
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;?php endif; ?&gt;
  </code></pre>
  <p>code file <code>functions.php</code></p>
  <pre><code>    function my_new_contactmethods( $contactmethods ) {
  
      $contactmethods['facebook'] = 'Facebook';
      $contactmethods['twitter'] = 'Twitter';
      
      return $contactmethods;
      }
      add_filter('user_contactmethods','my_new_contactmethods',10,1);
  </code></pre>