Okay
  Public Ticket #488371
Modifying Social Links
Closed

Comments

  • San started the conversation

    Is it possible to modify the social links at the footer to include other non-social links that aren't included?

  •  1,973
    Support replied

    Yes, the file to modify would be /sections/footer_social_links_section.php there is a for loop at the end which enumerates the social links

    thanks

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy

  • San replied

    Hi, this is what I found in that file, except I\'m not sure what I\'m supposed to do.




    <?php

    global $clapat_bg_theme_options;

    global $cpbg_social_links;

    if( $clapat_bg_theme_options[\'clapat_bg_footer_layout\'] == \'v1\' ){

    echo \'<ul class=\"text-socials\"> \';

    } else if( $clapat_bg_theme_options[\'clapat_bg_footer_layout\'] == \'v2\' ){

    echo \'<ul class=\"text-socials-minimal\">\';

    echo \'<li>\' . $clapat_bg_theme_options[\'clapat_bg_footer_socials_prefix\'] . \'</li>\';

    } else if( $clapat_bg_theme_options[\'clapat_bg_footer_layout\'] == \'v3\' ){

    echo \'<ul class=\"footer-socials\">\';

    }

    else{

    echo \'<ul>\';

    }

    for( $idx = 1; $idx <= MAX_SOCIAL_LINKS; $idx++ ){

    $social_name = $clapat_bg_theme_options[\'clapat_bg_social_\' . $idx];

    $social_url = $clapat_bg_theme_options[\'clapat_bg_social_url_\' . $idx];

    if( $social_url ){

    if( $clapat_bg_theme_options[\'clapat_bg_footer_layout\'] == \'v3\' ){

    echo \'<li><a href=\"\' . $social_url . \'\" target=\"_blank\"><i class=\"fa fa-\' . $social_name . \'\"></i></a></li>\';

    }

    else{

    echo \'<li><a href=\"\' . $social_url . \'\" target=\"_blank\">\' . $social_name . \'</a></li>\';

    }

    }

    }

    echo \'</ul>\';

    ?>

  •  1,973
    Support replied

    you can add your custom social links after the for loop as li tags.

    thanks

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy

  • San replied

    Sorry, I\'m useless at this. Tried a couple of variations, nothing that worked. So if I wanted the Google or Yahoo homepage to appear on with the social link options, am I supposed to replace something, or add an entirely new tag like: <li>Google</li> <li>Yahoo</li> ?


    for( $idx = 1; $idx <= MAX_SOCIAL_LINKS; $idx++ ){

    <li>Google</li> <li>Yahoo</li>

    $social_name = $clapat_bg_theme_options[\'clapat_bg_social_\' . $idx];

    $social_url = $clapat_bg_theme_options[\'clapat_bg_social_url_\' . $idx];


  •  1,973
    Support replied

    add the link before

    echo \'</ul>\';

    follow the model in the code, requires a bit of php knowledge

    (you have google plus and yahoo in the theme options but perhaps you want something which is not in the list)

    thanks

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy

  • San replied

    Bad example from my end. I was trying to add a link to another sister site (and possibly others in the future when I could think of it.) Yea, I have zero php knowledge. I don\'t suppose it\'s as simple as just putting <li>Sister Site</li> there. Thanks.


    }

    }

    <li>Sister Site</li>

    echo \'</ul>\';

    ?>

  • San replied

    Never mind. Got it! Thanks.

  •  1,973
    Support replied

    Great!

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy