2017-02-14 1 views
1

텍스트없이 WordPress의 게시물에 소셜 미디어 아이콘을 연결할 수 있습니까?WordPress 게시물 안에 텍스트없이 소셜 미디어 아이콘을 연결하는 방법?

나는 워드 프레스 비주얼 작곡가 텍스트 모듈에 코드를 아래에 사용한 :

<i class="fa fa-facebook" aria-hidden="true"></i> 
<i class="fa fa-google-plus" aria-hidden="true"></i> 
<i class="fa fa-twitter" aria-hidden="true"></i> 
<i class="fa fa-instagram" aria-hidden="true"></i> 
+0

나는 시각적 인 작곡가가 이미 사회적 아이콘을 만들 수있는 옵션을 가지고 있다고 생각한다. 너 그거 해봤 니? – Aslam

답변

1

당신이 시각적으로 원시 HTML 모듈을 시도 할 수로

<a href="https://www.facebook.com/xyz/"><i class="fa fa-facebook" aria-hidden="true"></i></a> 
<a href="https://plus.google.com/xyz"><i class="fa fa-google-plus" aria-hidden="true"></i></a> 
<a href="https://twitter.com/xyz"><i class="fa fa-twitter" aria-hidden="true"></i></a> 
<a href="https://www.instagram.com/xyz/"><i class="fa fa-instagram" aria-hidden="true"></i></a> 

이 게시물을 업데이트 한 후, 링크가 변경

작곡가? 이제

add_action('vc_before_init', 'socialMediaVC'); 
function socialMediaVC() { 
    vc_map(array(
     "name" => "My Social Media Shortcode", 
     "base" => "vc-social-media", 
     "class" => "vc-social-media", 
     "category" => "Content", 
     "params" => array(

     ) 
    )); 
} 

:

function social_media_shortcode($atts, $content) { 
    $a = shortcode_atts(array(
    ), $atts); 
    ob_start(); 
    ?> 
    <div class="vc-social-media"> 
     social items go here 
    </div> 
    <?php 
    return ob_get_clean(); 
} 
add_shortcode('social-media', 'social_media_shortcode'); 

는 다음과 같이 VC의 단축 코드를 등록 :

1

이상적으로이 같은 단축 코드 만들기 단축 코드를 작성하고 VC
사용하여 삽입 할 것 추가 할 수있는 고유 한 Visual Composer 개체가 있습니다.
또한 게시 용 또는 페이지 용 VC를 사용하고 있습니까?

+0

워드 프레스 페이지 –

관련 문제