Job a11n
(@jobthomas)
Automattic Happiness Engineer
Hey @ananddevops – that’s difficult to guess without a link to your site, but my hunch would be either of these two options:
- Your child theme is not the one that’s active under Appearance > Themes
- Your child theme is not correctly configured – you can easily test that by adding the below CSS to your child theme’s
style.css file. Please note that this will hide your entire website, so right after you’ve tested it you’ll want to make sure that you delete that section again. If your site is indeed hidden during, then your child theme is working fine.
The CSS to test if your child theme is configured correctly:
/* Add this to the child theme's style.css file. It will hide your entire website if it's configured correctly, so make sure to delete this section again right after. */
body {
display: none;
}
In any case, adding this custom code to Storefront’s functions.php file means that
@jobthomas
1. Child theme is active
2. The suggested change in style.css doesn’t take affect.
Like you said there must be some configuration issue, but what config?
1. My site is working fine.
2. Changes in child theme functions.php are reflecting fine.
I am using storefront-child-theme-master as my child them.
Thanks
Job a11n
(@jobthomas)
Automattic Happiness Engineer
2. Changes in child theme functions.php are reflecting fine.
I’m very confused now. You earlier said that changes in the child theme did not have an effect.
We have an explanation on how to set up a child theme with a sample here, but troubleshooting if this is done correctly isn’t part of the scope of this forum. Please go to the general ww.wp.xz.cn forums for help with child theme configurations.
@jobthomas
My apologies for being inaccurate. What I meant was, OTHER changes made in the child theme functions.php are reflecting fine. It is just this one thats not.
Which is why I am pretty confused as well.
Thanks
Job a11n
(@jobthomas)
Automattic Happiness Engineer
Hey @ananddevops – just to check, did you just copy the snippet mentioned above? Because that one still shows the Storefront and WooCommerce creds. You need to change it a bit to show what you want. For example, just replacing the creds with nothing will make it work:
if ( ! function_exists( 'storefront_credit' ) ) {
/**
* Display the theme credit
*
* @since 1.0.0
* @return void
*/
function storefront_credit() {
?>
<div class="site-info">
<?php echo esc_html( apply_filters( 'storefront_copyright_text', $content = '© ' . get_bloginfo( 'name' ) . ' ' . date( 'Y' ) ) ); ?>
<?php if ( apply_filters( 'storefront_credit_link', true ) ) { ?>
<br />
<?php
if ( apply_filters( 'storefront_privacy_policy_link', true ) && function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
}
?>
<?php echo '' ?>
<?php } ?>
</div><!-- .site-info -->
<?php
}
}
@jobthomas
True, that is what was happening with me.
This works super.
Thanks