Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #27990
    marja
    Member

    Hello,
    Thank you for creating this beautiful Catch Box theme. I am using the free version and have a question about the social media icons in the footer area.

    Is it possible to put a short text in front of these icons, something like ‘Follow me:’? If this is possible, could you explain to me how I could do this?
    I would like to add the text ‘Volg mij:’ in font type Segoe print, in front of the row of social media icons.

    Kind regards,
    Marja
    http://www.beeldenvanmarja.nl

    #28000
    Sakin
    Keymaster

    @marja: Sorry there is no option to change that in Catch Box Free Version. For that you need to build child child and then create functions.php file in your child theme and then copy catchbox_socialprofile in your child theme functions.php file and add the title below: <div class="social-profile">

    #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 );

    ?>

    #28090
    Sakin
    Keymaster

    @marja: It’s difficult to check in ling code here. Can you paste it in http://gist.github.com/ and link here. So, that I can read you code clearly. Also after you add this code you need to make any changes in theme options to clear the cache.

    #28096
    marja
    Member

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

    #28101
    Sakin
    Keymaster

    @marja: If you have just change any settings in theme options panel then it should have worked. Also there are extra code that you don’t need to add. Remove the following codes in your code.
    if ( ! function_exists( 'catchbox_socialprofile' ) ):

    endif; // catchbox_socialprofile
     
    // Load Social Profile catchbox_site_generator hook
    add_action('catchbox_site_generator', 'catchbox_socialprofile', 10 );

    If you change any settings in “Appearance => Theme Options” then you don’t need to change following code. Otherwise you need to change the following code
    //delete_transient( 'catchbox_socialprofile' );
    to
    delete_transient( 'catchbox_socialprofile' );

    #28106
    marja
    Member

    @Sakin: Many thanks, it is working!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Add text in front of social media icons’ is closed to new replies.