Support » Theme: Twenty Thirteen » Child Theme footer.php

  • Resolved quintain

    (@quintain)


    Hi
    This is the first time I have used a child theme, please see http://www.greenlabpestcontrol.co.uk

    I need to alter the child theme footer, do I just create a file called footer.php in the child theme folder to accompany the style.css file and copy all contents from original footer.php into it.

    Where in the footer contents or elsewhere do I add the command to centre the footer text: <p style=”text-align: center;”></p>

Viewing 13 replies - 1 through 13 (of 13 total)
  • esmi

    (@esmi)

    Forum Moderator

    do I just create a file called footer.php in the child theme folder

    Yes. Try initially just copying the parent’s footer.php file into the child and then start editing the child’s version.

    Where in the footer contents or elsewhere do I add the command to centre the footer text

    To centre what footer text?

    Hi esmi

    Thank you for your quick reply.
    To centre the existing “Proudly powered by WordPress”

    esmi

    (@esmi)

    Forum Moderator

    You should be able to do this using pure CSS using something like:

    .site-info {text-align:center;}

    esmi
    Thank you again I have tried your info
    .site-info {text-align:center;}

    in a variety of places within the footer.php but I cannot get it to centre the text, where am I going wrong ??

    Where should I place the code in the text below.

    <?php
    /**
     * The template for displaying the footer
     *
     * Contains footer content and the closing of the #main and #page div elements.
     *
     * @package WordPress
     * @subpackage Twenty_Thirteen
     * @since Twenty Thirteen 1.0
     */
    ?>
    
    		</div><!-- #main -->
    		<footer id="colophon" class="site-footer" role="contentinfo">
    
    			<?php get_sidebar( 'main' ); ?>
    
    			<div class="site-info">
    
    <a href="http://www.disney-villavacation.com/">site by Richard</a> and
    				<?php do_action( 'twentythirteen_credits' ); ?>
    				<a>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentythirteen' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?></a>
    			</div><!-- .site-info -->
    		</footer><!-- #colophon -->
    	</div><!-- #page -->
    
    	<?php wp_footer(); ?>
    </body>
    </html>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    esmi

    (@esmi)

    Forum Moderator

    You need to add it to your theme’s stylesheet.

    My apologies for not picking up immediately your advice.
    I understand you are saying place it in my new style.css file which I built as the first file in my child theme.

    I further understand it should be added immediately after
    /* =Theme customization starts here
    ————————————————————– */
    but I must relate the instruction to the footer only so I cannot just use the instructions: .site-info {text-align:center;}

    I would welcome a complete instruction; perhaps:
    .footer-info {text-align:center;}

    Just tried that but didn’t work

    esmi

    (@esmi)

    Forum Moderator

    I cannot just use the instructions: .site-info {text-align:center;}

    Yes you can. Please try it.

    If all else fails believe in the expert.

    Thank you it did as you knew would work on the footer.

    I don’t understand why it has not centred all the site text.

    Again thank you for your help, if you can explain or point me to a link for me to understand why it is only effecting the footer I would be thankful.

    BTW; I created a child theme as a result of your many posts recommending that such be built. I have for years put of doing so for my (to date) preferred theme of Atahualpa but I thought after listening to you I should “bite the bullet” and try it.

    Best regards and thank you.

    esmi

    (@esmi)

    Forum Moderator

    I don’t understand why it has not centred all the site text.

    Because the .site-info class is only used in the footer of that theme. If you would like to learn more about the way in which CSS works, I recommend:
    CSS Tutorials
    Learning CSS

    Thank you

    Of course, if I had looked further into the css I may have spotted that.
    Again thank you for the time you have spent helping me.

    esmi

    (@esmi)

    Forum Moderator

    Not at all. Glad to have helped. You might also want to try using Firefox with the Firebug add-on for this kind of CSS troubleshooting. It can take hours off this kind of work.

    Again, good advice if I started to use firebug which I have had for a heck of a long time and ‘promised myself’ that I would learn how to use it correctly.

    Thanks Esmi

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Child Theme footer.php’ is closed to new replies.