Support » Theme: Customizr » Add a new social network (sidebar and footer)

  • Hello,
    I would like to add a new social network icon and link on my Hueman child theme but it didn’t work.

    I am a beginner with wordpress child theme.

    I am using that code in my functions.php of my child theme

    <?php
    add_action('wp_footer', function() {
      ?>
      <script type="text/javascript">
        jQuery( function($){
            if ( ! $('.social-links', 'header').length )
              return;
            $('.social-links').append(
                $('<a/>', {
                    rel   : "nofollow",
                    class : "social-icon",
                    title : "rio",
                    href  : "<?php echo 'https://raider.io/' ?>",
                    target:"_blank",
                    html : "<img src='<?php echo get_stylesheet_directory_uri(); ?>/img/raiderio.png' width='20'/>"
                })
            );
        });
      </script>
      <?php
    });
    ?> 

    I hope you can help me. I think the problem is coming from that

    if ( ! $('.social-links', 'header').length )
              return;

    I used the code from Nikeo on Github
    https://gist.github.com/Nikeo/fdd2db549069da81012ee5d0f3f2fe24#file-customizr_add_social_link-php

    • This topic was modified 6 months, 1 week ago by  anthof15.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add a new social network (sidebar and footer)’ is closed to new replies.