Site logo

Archived topic

child theme created lately

10 replies · Started by Torsten on March 4, 2020

Viewing posts 1–11 of 11

Hi Tom,
I've setup a child theme when starting this project, and then I made a big beginner mistake - I forgot to activate it!
Therefore I now exported the website, installed it in a new subdomain, almost everything looks fine now, but,
on every page I have now a side padding around the widgets!

I checked if generatepress premium is activated, checked if the css in customizer and Custom CSS in Appearence is identical in both version, checked the UberMenu settings, compared the row settings in SiteOrigin on both startpages, etc. pp.
I can't find any differences...
I even tried to acitivate the parent theme, delete the custom CSS in both section and reactivate the child theme with the css code in both sections, but that makes things worse.

Have you got any idea which settings I would need to adjust, compare, go through?

The header settings changed as well (paddings and font size):
e.a. the font size in the header (NEWS, KARRIERE,...)
Going into customizer and changing primary navigation font size from 13px to 12px and back, it shows the correct font size in preview, after saving the setting it goes back to 15px.
I added

.main-navigation a {
    font-size: 13px;
}

in custom css to get the propper settings.

Please help with directions,
best,
Torsten

Hi there,

can you disable autoptimize to make sure there is no issues with the cache.
Secondly when making changes in the Customizer , make sure they are Published and NOT Saved as Draft.

let us know

Hi David,
I disabled autoptimize on the new subdomain.
Custom CSS status is "puplished".
Thanks David for checking on this issue!

So just to be clear, on your Development Site you did all the customization without the Child Theme.
Then when you moved it to the new sub domain you activated the Child Theme and the customizations broke ?

that's correct.

So is your development/staging site still working correctly?
If so can you export / import the theme settings from there and then copy and paste over the CSS?

Hi David,
I exported the setting from → Appearance → GeneratePress and imported them into the new subdomain.
No success...
best,
Torsten

Hmmm - what do you have in your child theme functions file ? Any custom functions ?

Hi David,
no changes applied to the function.php directly,
in Snippets I've added the code for the Roboto font locally:

add_filter( 'generate_typography_default_fonts', function( $fonts ) {
    $fonts[] = 'Roboto';
	    $fonts[] = 'Roboto Condensed';
	    $fonts[] = 'Roboto Mono';
		    $fonts[] = 'Roboto Slab';
    $fonts[] = '';
    return $fonts;
} );

and another one for the customized back-to-top button:

add_filter( 'generate_back_to_top_output', 'tu_custom_back_to_top_icon' );
function tu_custom_back_to_top_icon() {
    printf(
		'<a title="%1$s" rel="nofollow" href="#" class="generate-back-to-top" style="opacity:0;visibility:hidden;" data-scroll-speed="%2$s" data-start-scroll="%3$s">
			<img src="https://myURL.com/wp-content/uploads/2019/12/image-file.png" alt="back to top" />
			<span class="screen-reader-text">%5$s</span>
		</a>',
		esc_attr__( 'Scroll back to top','generatepress' ),
		absint( apply_filters( 'generate_back_to_top_scroll_speed', 400 ) ),
		absint( apply_filters( 'generate_back_to_top_start_scroll', 300 ) ),
		esc_attr( apply_filters( 'generate_back_to_top_icon','fa-angle-up' ) ),
		__( 'Scroll back to top','generatepress' )
	);
}

hope that helps...

if you would like to get admin access, let me know how to send login details in a private message.

Hi there,

It looks like you're loading the parent theme style.css file twice.

https://www.screencast.com/t/5gS5qjJ1I09B

The first arrow is the parent style loaded by the theme.

The second is being added by your child theme most likely. Perhaps there's another function in the functions.php file?

The third is your child theme CSS.

This archived topic is closed to new replies.