1. Home
  2. Docs
  3. Footer
  4. Social Media
  5. Socmed Scripts

Socmed Scripts

<?php 
                 global $post;
                
                $id=785; 
                $pid = $id;
                //echo $main_id;
                $post = get_post($id); 
                $content = apply_filters('the_content', $post->post_content); 
                //echo $content;  
              ?>
          <div class="col-2 pull-right d-md-none d-none d-lg-block d-sm-block footer-rights">
            <ul>
              <li>
                <a href="<?php the_field('socmed_url')?>" class="fa <?php the_field('social_media_type')?>"></a>
                <a href="<?php the_field('socmed_url_2')?>" class="fa <?php the_field('social_media_type_2')?>"></a>
                <a href="<?php the_field('socmed_url_3')?>" class="fa <?php the_field('social_media_type_3')?>"></a>
				<a href="<?php the_field('socmed_url_4')?>" class="fa <?php the_field('social_media_type_4')?>"></a>
				<a href="<?php the_field('socmed_url_5')?>" class="fa <?php the_field('social_media_type_5')?>"></a>  
              </li>
              <li>Alamat: <?php the_field('contact_address')?></li>
              <li>T: <?php the_field('contact_phone')?> </li>
			  <li style="margin-top:10px;"> </li>
			  <li style="width: 100%;"><a href="<?php the_field('footer_other_link')?>"><?php the_field('footer_other_title')?></a></li>
			  <li><a href="<?php the_field('footer_other_link_2')?>"><?php the_field('footer_other_title_2')?></a></li>	
              <li><a href="<?php the_field('footer_other_link_3')?>"><?php the_field('footer_other_title_3')?></a></li>
              <li><a href="<?php the_field('footer_other_link_4')?>"><?php the_field('footer_other_title_4')?></a></li>
            </ul>
          </div>
		  <?php 
						  }else{ 
							  ?>
		  <?php 
                 global $post;
                
                $id=24; 
                $pid = $id;
                //echo $main_id;
                $post = get_post($id); 
                $content = apply_filters('the_content', $post->post_content); 
                //echo $content;  
              ?>
		  <div class="col-2 pull-right d-md-none d-none d-lg-block d-sm-block footer-rights">
            <ul>
              <li>
                <a href="<?php the_field('socmed_url')?>" class="fa <?php the_field('social_media_type')?>"></a>
                <a href="<?php the_field('socmed_url_2')?>" class="fa <?php the_field('social_media_type_2')?>"></a>
                <a href="<?php the_field('socmed_url_3')?>" class="fa <?php the_field('social_media_type_3')?>"></a>
				<a href="<?php the_field('socmed_url_4')?>" class="fa <?php the_field('social_media_type_4')?>"></a>
				<a href="<?php the_field('socmed_url_5')?>" class="fa <?php the_field('social_media_type_5')?>"></a>  
              </li>
              <li>Address: <?php the_field('contact_address')?></li>
              <li>T: <?php the_field('contact_phone')?> </li>
				<li style="margin-top:10px;"> </li>
				<li style="width: 100%;"><a href="<?php the_field('footer_other_link')?>"><?php the_field('footer_other_title')?></a></li>
			  <li><a href="<?php the_field('footer_other_link_2')?>"><?php the_field('footer_other_title_2')?></a></li>	
              <li><a href="<?php the_field('footer_other_link_3')?>"><?php the_field('footer_other_title_3')?></a></li>
              <li><a href="<?php the_field('footer_other_link_4')?>"><?php the_field('footer_other_title_4')?></a></li>
            </ul>
          </div>
		  
		  <?php } ?>

description:

Display the social media, you can update the social media in the Contact Us page http://webtttest.southeastasia.cloudapp.azure.com/wp-admin/post.php?post=24&action=edit

the $id=24; is refer to the Contact page id

Was this article helpful to you? Yes No

How can we help?

Leave a Reply

Your email address will not be published. Required fields are marked *