[Resolved] Customiser Settings aren't applied

Home Forums Support [Resolved] Customiser Settings aren't applied

Home Forums Support Customiser Settings aren't applied

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #954126
    Thomas

    Hey!
    We’re building a new website using your theme and imported “split”.
    When customising some things in the customizer of the theme, however, we face some issues! For example, we can’t change the font-size in the menu, change it to uppercase, or change the spacing.
    There seem to be some hard-coded settings in style.css that overwrite such settings?
    Would be great if you could help is with that. In our opinion, customiser settings should be applied without issues?
    If you open the Chrome developer console, you’ll see that the described items are defined differently in the customiser than they appear on the front-end due to overruling entries in style.css.
    We disabled all caching on CloudFlare (we use CF as DNS service only), and there are no caching plugins installed on the website.
    WordPress, Generatepress, and Generatepress Premium are on their newest version. We have a child theme, which we work with.
    Thank you in advance,
    Thomas

    #954131
    David
    Staff
    Customer Support

    Hi there,

    Customizer styles are added as an inline style to the <head> of the site. Your child theme style sheets are being called after that CSS hence it is overwriting the customizer settings.

    If you’re not making any edits to the parent style sheets then you don’t require them in your child theme, if you’re are then you need to enqueue them earlier.

    #954145
    Thomas

    Hi David,
    I am not sure I understand:
    – no, we never make changes to the parent style sheet (original generatepress style.css)
    – we add custom styles in customizer (if there aren’t many customizations) OR in the style.css of the child theme if there are more customizations

    Now I don’t fully understand what you mean with “If you’re not making any edits to the parent style sheets then you don’t require them in your child theme, if you’re are then you need to enqueue them earlier.” – because as far as I know one should never make changes to the parents style sheet, because it would kind of defy the use of a child theme, or not?

    #954163
    David
    Staff
    Customer Support

    If you inspect the head of the site you will see the customizer styles:

    <style id="generate-style-inline-css" type="text/css"></style>

    Immediately after that is:

    <link rel="stylesheet" id="chld_thm_cfg_parent-css" href="https://zzzzzzzzzzzzzz.ch/wp-content/themes/generatepress/style.css?ver=9b214bb5f12b1f94af83f08ff32b9e3d" type="text/css" media="all">

    Looks like this is being called by your child theme and is overriding the customizer styles.

    #954218
    Thomas

    The problem was indeed the functions.php file and the way styles were enqueued!
    Thanks for the quick and good help.
    I followed https://developer.wordpress.org/themes/advanced-topics/child-themes/ to resolve it.

    #954221
    David
    Staff
    Customer Support

    Awesome – sorry for the original confusion – glad to hear its resolved.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.