WordPress.org

Support

Support » Themes and Templates » [Resolved] [Theme: Yoko] removing social media widget text

[Resolved] [Theme: Yoko] removing social media widget text

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there.

    I believe I have to modify the functions.php

    That is correct, yes, particularly, lines 470 to 477. You have to modify the conditional statements that are testing whether or not the icon text is empty, and instead test whether the social icon url is empty.
    Example:
    The code for your RSS icon should change from this:

    if($rss_title == ' ') { echo ''; } else {  echo  '<li class="widget_sociallinks"><a href="'. $rss_url .'" class="rss" target="_blank">'. $rss_title .'</a></li>'; }

    To this:

    if($rss_url == ' ') { echo ''; } else {  echo  '<li class="widget_sociallinks"><a href="'. $rss_url .'" class="rss" target="_blank"></a></li>'; }

    Then, you have two choices:
    1. Style the <a> and <li> tags through CSS and leave the links empty;
    2.Modify the HTML output further so as to change your HTML structure from this:

    <ul>
       <li>
          <a>Icon 1 Text
          </a>
       </li>
       <li>
          <a>Icon 2 Text
          </a>
       </li>
       Etc.
    </ul>

    To this:

    <ul>
       <li>
          <a>
             <img src="path/to/icon/1" />
          </a>
       </li>
       <li>
          <a>
             <img src="path/to/icon/2" />
          </a>
       </li>
       Etc.
    </ul>

    In the second case, you would need to remove background images to your links and either:
    1. Hardcode the entire image path in the src img attributes;
    2. Hardcode part of it and leave the image name dynamic. For instance, you could use the icon text option as the image file name, like so:

    if($rss_url == ' ') { echo  '<li class="widget_sociallinks"><a href="'. $rss_url .'" class="rss" target="_blank"><img src="/path/to/icons/folder/'. $rss_title .'.png alt="'. $rss_title .'" /></a></li>'; }

    Cheers!

    Brilliant! Thanks for your help!

    No problem. I hope you can figure it out.
    Cheers!

    Hi there.
    If the above code worked and you were able to figure out your issue, could you please mark the thread as resolved whenever you get a chance?
    Thanks!

    Will do. Thanks again!

    can you do it through a menu? I’m no coder. I added them somehow but can’t see where I can hide them or remove them.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] [Theme: Yoko] removing social media widget text’ is closed to new replies.