• Resolved ahoetomo

    (@ahoetomo)


    Can anyone help me with the code I need to insert in order to get my email address and phone number details in the footer please? This is my website: bestunningmakeupandhair.com

    I created a child theme already. Someone suggested that I edit the customizr/parts/class-main-footer.php but since I’m new (this is my first website) I don’t know how which line to edit. Thank you in advance for all your help.

Viewing 15 replies - 1 through 15 (of 20 total)
  • I’ve shown you the code to change, with an example from one of my sites at:
    https://pastebin.com/cfeC8wHh

    Have a look at it, and start from there.

    As you say, code is in class-main-footer.php

    There are two footer areas: the grey footer area and the white copyright area below it. If you want to edit the grey area, follow the instructions here.

    Thread Starter ahoetomo

    (@ahoetomo)

    @rdellconsulting: Thanks for your reply. Do I need to copy the whole class-main-footer.php to my custom css and change the part shown in your website according to my website info? Or do I need to insert the part that I need to change according to your website on my css? Sorry for the noob question.

    @electricfeet: Thanks for your response. It’s actually the white copyright area that I wanted to add more info to.

    I tried to insert the following code to my css but it won’t display the necessary info. Please let me know if I did this the wrong way since I’m so confused.

    {
    ?>
    <div class=”colophon”>

    <div class=”container”>

    <div class=”row-fluid”>

    <div class=”span4 social-block pull-left”>
    <?php do_action( ‘__social’ , ‘tc_social_in_footer’ ); ?>
    </div>

    <?php
    printf( ‘<div class=”span4 credits”><p> · © %1$s [email protected] | 022 396 0640 ·</p></div>’ ,
    esc_attr( date( ‘Y’ ) ),
    esc_url( home_url() ),
    esc_attr(get_bloginfo()),
    esc_html( get_the_date() )
    );
    //printf( $credits);
    ?>

    <div class=”span4 backtop”>

    <p class=”pull-right”>
    <?php _e( ‘Back to top’ , ‘customizr’ ) ?>
    </p>

    </div>

    </div><!– .row-fluid –>

    </div><!– .container –>

    </div><!– .colophon –>
    <?php
    }

    Thank you very much for your help.

    What you’ve displayed in previous post is PHP code which needs to be changed in customizr/parts/class-main-footer.php.

    When customizr is updated, this file will be overwritten, so you need to:
    1) Save a copy of the original class-main-footer.php
    2) Overwrite it with your amended version.
    3) After update, will need to overwrite again.

    Another idea: instead of updated the class-main-footer.php everytime you update your theme, you could copy the class-main-footer.php file and put into your child theme (using the same path- so add a “parts” file and put it in there). Then make the changes to the php file in the child theme. That’s what I did and it worked.

    Thread Starter ahoetomo

    (@ahoetomo)

    I must have done something wrong since my amended version won’t even show. I don’t know what to do. Any advice? Thanks everyone.

    I see you’ve put it back together again ??

    You need to replace this (this is Customizr 3.0.5; it may have changed now):

    <?php
    			        printf( '<div class="span4 credits"><p> &middot; &copy; %1$s <a href="%2$s" title="%3$s" rel="bookmark">%3$s</a> &middot; '.__( 'Designed by ' , 'customizr' ).'<a href="https://www.themesandco.com">Themes & Co</a> &middot;</p></div>' ,
    							    esc_attr( date( 'Y' ) ),
    							    esc_url( home_url() ),
    							    esc_attr(get_bloginfo()),
    							    esc_html( get_the_date() )
    							  );
    			        //printf( $credits);
    			        ?>

    With this:

    <?php
    			        printf( '<div class="span4 credits"><p>YOUR HTML HERE</p></div>'
    							  );
    			        //printf($credits);
    			        ?>

    p.s. If you reply with code here, make sure you put backticks around it (see second line of instructions below the editing window), otherwise we cannot see what you’ve written properly because the code gets mangled by our browsers, as they try to interpret it.

    OK, I’ve just upgraded to 3.0.8 and it’s changed. You now need to change this part of the file:

    <p> &middot; &copy; %1$s <a href="%2$s" title="%3$s" rel="bookmark">%3$s</a> &middot; Designed by %4$s &middot;</p>',
    					    esc_attr( date( 'Y' ) ),
    					    esc_url( home_url() ),
    					    esc_attr(get_bloginfo()),
    					    '<a href="https://www.themesandco.com">Themes & Co</a>

    to this:
    <p> YOUR HTML HERE</p>

    Thread Starter ahoetomo

    (@ahoetomo)

    Thank you ElectricFeet, for all your help. I plugged the code in but the info still didn’t show. It’s alright though. I decided to put my website info in the grey footer area instead. I know I must have not inserted the code the right way.

    Final question, is there a way to reduce the space in the bottom of the grey footer area? I seem to have more space after I’ve put my info in there.

    Would like to thanks everyone here who has helped me in figuring this out.

    Ahoetomo,

    I think I have the information you’ve been looking for.

    If you want to change or remove the copyright information in the white footer section (main-footer) you will find the code you need to change in the class-main-footer.php file. Copy this file (found in ../customizr/parts/) and paste it in a “parts” folder that you create within your child theme and edit said copy.

    At the bottom you will see this code:

    <div class="span4 credits">
    	    	<?php
    		    	$credits =  sprintf( '<p> &middot; &copy; %1$s <a href="%2$s" title="%3$s" rel="bookmark">%3$s</a> &middot; Designed by %4$s &middot;</p>',
    					    esc_attr( date( 'Y' ) ),
    					    esc_url( home_url() ),
    					    esc_attr(get_bloginfo()),
    					    '<a href="https://www.biologydesign.com">BIODesign</a>'
    				);
    				echo apply_filters( 'footer_credits', $credits );
    			?>
    		</div>

    If you want to just change the “Designed by” company info by changing '<a href="https://www.themesandco.com">Themes &amp Co</a>' to include your URL and company name.

    Also, if you want to add your email you can just add another a tag behind the original. Be sure to keep in within the one set of ‘ ‘ you see above.

    Lastly, if you want to get rid all the copyright info you can just delete this line:
    add_action( '__credits' , array( $this , 'tc_footer_credits' ) , 10 , 2); which is at the top of this same file.

    Hope this helps.

    Thread Starter ahoetomo

    (@ahoetomo)

    Seahawksean, thank you for your help. I now understand how to do it because of you. Again, thank you very much.

    You’re more than welcome, @shoetomo. It’s nice to be able to help out someone else on here.

    Latest info for 3.0.10. The file to edit is class-footer-footer_main.php

    Hi Seahawksean,

    Lastly, if you want to get rid all the copyright info you can just delete this line:
    add_action( ‘__credits’ , array( $this , ‘tc_footer_credits’ ) , 10 , 2); which is at the top of this same file.

    Hope this helps

    I cannot find this in my class-footer-footer_main.php

    It’s changed in later versions of Customizr.

    However, the problem with deleting the whole add_action line is that you will remove the whole block (span4) in the footer, so your “back to top” link will be shifted to the centre to fill the empty “slot”.

    If you want to completely remove the credits, then just delete the line
    echo $credits;
    in class-footer-footer_main.php.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Editing the copyright/credits line by adding my website info’ is closed to new replies.