In the child theme footer.php file, remove this section:
<?php do_action( 'twentytwelve_credits' ); ?>
<a href="<?php echo esc_url( __( 'http://ww.wp.xz.cn/', 'twentytwelve' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentytwelve' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentytwelve' ), 'WordPress' ); ?></a>
Add your text in the same place – it should end up being right between these tags (after removing the above):
<div class="site-info">
PUT YOUR INFO HERE
</div><!-- .site-info -->
Then add this to your child theme style.css file:
.site-info {
text-align: center;
}
Thread Starter
linwp
(@linwp)
Thank you so much for this WPyogi – it worked like a charm! Would I be able to sneak an image in here?
Sure, just add the HTML for an image:
<img src="ABSOLUTE URL FOR THE IMAGE" alt="ALT TEXT" id="footer-image" />
Get the URL from the Media Library image screen after you’ve uploaded the image.
Thread Starter
linwp
(@linwp)
I can’t understand why the parent theme is not being affected by the change in the Child theme. Any ideas. Do I have to make the change in the parent footer template manually? Sorry to back this late but I am actually rebuilding the site due to a couple of issues – just saw this now. The header and Proudly powered aren’t changing …in the parent
All of your changes need to be made in copies of the relevant files in your child theme.
Thread Starter
linwp
(@linwp)
Thanks esmi I did yhe change in the parent themes as well. there’s only one thing. I can’t see where to put this in :.site-info {
text-align: center;
}
In the child theme I simply placed it under the ‘import parent theme’ phrase. Where should it go in Parent theme – I appended at the bottom and it just ignored it – may have something wrong. or do I look for this class inthe styles sheet of the parent and make the change? Apologies – am really newbie.
Thanks again
Remove your changes in the parent theme. All changes need to be in the child theme.
Thread Starter
linwp
(@linwp)
I made the change to remove ‘proudly powered by wordpress’ in the footer php in my child theme – but it doesn’t change in the parent theme …Is there something I’m missing?
The manuals and info I read not always clear about how this works. I built my site in Child theme and presume at the end – when I go ‘live’ – I swap the two (activate the Parent) and the Parent is the one everyone sees?
Thanks Esmi
(I restored the change I made in Parent theme as you instructed btw)Its back to Proudly powered by WordPress
No, if you are making changes in the child theme – presumably that’s the one you want to be visible on your site. A parent theme doesn’t show child theme changes. If you switch to the parent, there’s no point in having a child theme at all.
Thread Starter
linwp
(@linwp)
OK – at long last :)I thought the Child theme is a type of backup for the parent – the parent is live and receives all the updates and is in the ‘front’ with the child backing up. I was wrong.
So when I run updates on the parent does that update the child? How does it work?
Thank WPyogi