Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Add text in front of social media icons #28106
    marja
    Member

    @Sakin: Many thanks, it is working!

    in reply to: Add text in front of social media icons #28096
    marja
    Member

    Hello Sakin,
    I pasted the ling code in gist.github.com. This is the link:
    https://gist.github.com/anonymous/11395792

    in reply to: Add text in front of social media icons #28012
    marja
    Member

    Hello Sakin,
    Thank you for your response. I built a child theme and created a functions.php file. After copying the complete function catchbox_socialprofile in this file I added ‘Volg mij:’ below <div class=”social-profile”>. However, no title is showing before the social media icons on my website. Could you advise me what I have to change in this functions.php to make it work? (See below for the php file)
    Thank you.
    Marja

    <?php
    /**
    * Catch Box Child Theme functions and definitions
    *
    */

    if ( ! function_exists( ‘catchbox_socialprofile’ ) ):
    /**
    * Social Profles
    *
    * @since Catch Box 1.0
    */
    function catchbox_socialprofile() {

    //delete_transient( ‘catchbox_socialprofile’ );

    $options = get_option(‘catchbox_options_social_links’);
    $flag = 0;
    if( !empty( $options ) ) {
    foreach( $options as $option ) {
    if( $option ) {
    $flag = 1;
    }
    else {
    $flag = 0;
    }
    if( $flag == 1) {
    break;
    }
    }
    }

    if( ( !$catchbox_socialprofile = get_transient( ‘catchbox_socialprofile’ ) ) && ($flag == 1) ) {
    echo ‘<!– refreshing cache –>’;

    $catchbox_socialprofile = ‘
    <div class=”social-profile”>
    Volg mij:

      ‘;
      //Facebook
      if ($options[‘social_facebook’]) {
      $catchbox_socialprofile .= ‘<li class=”facebook”>Facebook‘;
      }

      //Twitter
      if ($options[‘social_twitter’]) {
      $catchbox_socialprofile .= ‘<li class=”twitter”>Twitter‘;
      }

      //Linkedin
      if ($options[‘social_linkedin’]) {
      $catchbox_socialprofile .= ‘<li class=”linkedin”>Linkedin‘;
      }

      $catchbox_socialprofile .= ‘

    </div>’;
    set_transient( ‘catchbox_socialprofile’, $catchbox_socialprofile, 604800 );
    }
    echo $catchbox_socialprofile;
    }
    endif; // catchbox_socialprofile

    // Load Social Profile catchbox_site_generator hook
    add_action(‘catchbox_site_generator’, ‘catchbox_socialprofile’, 10 );

    ?>

Viewing 3 posts - 1 through 3 (of 3 total)