• Resolved fwunder

    (@fwunder)


    I want to add one line of text – “Follow Us” above the social icons in the colophon.

    I can do it by editing class-footer-footer_main.php to

    sprintf('<span class="tc-footer-social-links-wrapper" %1$s><div class="social-text">Follow Us</div>%2$s</span>'

    But, I am struggling to write the proper filter for my child theme functions.php. Something like:

    add_filter( 'tc_colophon_left_block', 'add_social_text' );
    function add_social_text() {
    
    return 'the block with the Follow us text above the icons';
    
    }

    Thanks….again!

Viewing 1 replies (of 1 total)
  • Thread Starter fwunder

    (@fwunder)

    The excellent support staff @ Themes & Co. once again came through with the solution – quite brilliantly. Adding the following filter to my child theme functions.php:

    add_filter('tc_colophon_left_block', 'add_html_above_socials');
    function add_html_above_socials( $_html ){
      $my_html = sprintf('<span class="my_social_title">%s</span>',
                __('Follow us', 'customizr-child')
            );
      return str_replace( '<span', $my_html.'</span', $_html);
    }

    And to my child them style.css

    .my_social_title {
        display: block;
        color: #000;
        font-size: 11px;
        }

    This created a block (display: block;) in the colophon left block position and above the icons. As I said…brilliant.

Viewing 1 replies (of 1 total)
  • The topic ‘Add Filter to colophon’ is closed to new replies.