• Hi,

    I am confused because I could not find information about my wish. I would like to place a “subscribe to newsletter” icon next to the social icons. I use RSS and Google+ icons so far. I am not capable to write functions and my css skills are quite little.

    Could you please help me?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Snippet here. Hope you can understand it. It looks complex but not so difficult once you get the hang of it.

    Thread Starter Ypanesa

    (@ypanesa)

    I found this snippet before but had no clue what to do with it. Something like that? I only replaced vimeo by newsletter.

    add_filter ('tc_social_in_header' , 'newsletter_in_header');
    function newsletter_in_header($resp) {
        //class added if not resp
        $class         =  ('resp' == $resp) ? '':'span5'
        ?>
            <div class="social-block <?php echo $class ?>">
                <?php if ( 0 != tc__f( '__get_option', 'tc_social_in_header') ) : ?>
                       <?php echo tc__f( '__get_socials' ) ?>
                       <a class="social-icon newsletter-icon" href="#http://eepurl.com/L9g35" title="Newsletter abonnieren" target="_blank"></a>
                   <?php endif; ?>
            </div><!--.social-block-->
        <?php
    }

    And then in the CSS file:

    .vimeo-icon:before {
    content: "\\f463";
    }

    Once I get the right code, I copy the original function.php in my child thme and add the first code. Then I add the second code to my CSS file in the child theme. Is that right?

    In theory 😉

    The CSS would be .newsletter-icon:before {

    Thread Starter Ypanesa

    (@ypanesa)

    Really? I was so close to the target? Cooool!!!

    Thank you so much. That’s really fun now. 😉

    Thread Starter Ypanesa

    (@ypanesa)

    Now I would like to have the same icon in the footer. I tried like this, but it won’t work (of course ;))

    add_filter ('tc_social_in_footer' , 'newsletter_in_footer');
    function newsletter_in_footer($resp) {
        //class added if not resp
        $class         =  ('resp' == $resp) ? '':'span5'
        ?>
            <div class="social-block <?php echo $class ?>">
                <?php if ( 0 != tc__f( '__get_option', 'tc_social_in_footer') ) : ?>
                       <?php echo tc__f( '__get_socials' ) ?>
                       <a class="social-icon newsletter-icon" href="http://eepurl.com/L9g35" title="Newsletter abonnieren" target="_blank"></a>
                   <?php endif; ?>
            </div><!--.social-block-->
        <?php
    }

    We don’t need anything for CSS, because it is done alreade for the header?

    I’m not a php expert (yet!). Here’s the actual core code in class-footer-footer_main.php that needs addressing:

    /**
    	 * Displays the social networks block in the footer
    	 *
    	 *
    	 * @package Customizr
    	 * @since Customizr 3.0.10
    	 */
        function tc_colophon_left_block() {
    
          	echo apply_filters(
          		'tc_colophon_left_block',
          		sprintf('<div class="%1$s">%2$s</div>',
          			apply_filters( 'tc_colophon_left_block_class', 'span4 social-block pull-left' ),
          			0 != tc__f( '__get_option', 'tc_social_in_footer') ? tc__f( '__get_socials' ) : ''
          		)
          	);
        }

    Maybe someone else can give us a lead?

    Thread Starter Ypanesa

    (@ypanesa)

    Maybe nikeo can help?

    I have to confess that I would cheat in this case and simply add another entry in the socials array in class-fire-init.php. It would then appear in both places automatically (and would also be in the Customiz’it panel). However, that approach would need re-entering every time you upgrade Customizr, because (a) the upgrade will overwrite the old file and (b) in any case, you’ll need to make sure that all the other code is still current (and it’s easier to enter the addition to the socials than it is to check all the other code for changes).

    Thread Starter Ypanesa

    (@ypanesa)

    To put the code to the header wasn’t a big deal, thanks to rdellconsulting. If you wright like that, does that mean, to put it in the footer is complicated?

    @customizr developper: is it maybe possible to add a few additional entrys to that part of customizing > social links, that are freely customizable? I miss newsletter and eMail-subscription.

    Yes, the footer is not the same/not as easy.

    You’re asking @nikeo to add more. Hint: he would edit class-fire-init.php to do so 🙂

    Thread Starter Ypanesa

    (@ypanesa)

    OK, got it. Thank you for finding the concerned template. 🙂

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Customizr: Add Icons to the social icon list in header and footer’ is closed to new replies.