• I’ve been developing my blog and have good knowledge on HTML & CSS and feel comfortable making customisations to certain elements etc. however I don’t know anything about php and feel really overwhelmed trying to amend anything in my php files – especially as my parent theme seems to be lacking specific things compared to other examples I have seen…but maybe I’m just not used to the language and file structure itself.

    I created the child theme using the old @import method, and as stated, it does load elements quite slow, especially images and occasionally the nav bar.

    If I use the functions.php import method will this speed my issues up and if so can someone look at my code and help me with how to import my styles to my child theme. I have looked at examples and the official wordpress instructions for doing so but can’t seem to get my head around it.
    So if someone could help me out with the functions.php code that I need that would help me so much.

    Thanks again

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Don’t “import styles to the child theme”. Enqueue the parent and put only your overrides in the child’s style.css. The child theme should contain only things that differ from the parent.

    Thread Starter askrupska

    (@askrupska)

    That is what I have done sorry for not phrasing it correctly….

    What I meant is I put in the @import url(“”); of my parent theme and adding only my own styles into my child theme’s stylesheet

    Like I said I have no idea how to do the enqueue part

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Maybe an example will help. Here’s the child theme of 2017 I use on my site. It adds a Google font or two and tweaks the hero image size,

    https://github.com/sterndata/sds_2017

    Using the enqueue methods makes it easy for a plugin like “autoptimize” to minify and combine CSS into one file.

    Thread Starter askrupska

    (@askrupska)

    Thanks for that, managed to get it working! ??

    Although it still seems like there’s a loading issue.

    For example if you go onto a new page and as it loads, scroll down and then back up again the nav bar seems to disappear for a few seconds and then comes back.
    It’s as if it loads it twice.

    What could be the issue for this as it is quite off putting.

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