• Resolved jkshay

    (@jkshay)


    I’ve created a child theme based on Writr and noticed that my post icons are tiny and centered in the top of the circle. If I revert to the original theme, the icon is centered in the circle and takes most of the space available in the circle. What might I be missing? In my child theme folder I have a style.css, rtl.css (both with “Template: writr” entries) and my functions.php file begins with `<?php
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
    }`

    My site can be found at https://jkshay.com. Thanks for your help!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Could you try adding the priority 11 to the first line, like this?

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 11 );
      function theme_enqueue_styles() {
       wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    }

    I’ll also ask our developers to have a look because I don’t think that should be necessary, but it does fix the issue in my testing. Let me know how it goes.

    Thread Starter jkshay

    (@jkshay)

    Thanks for the reply, Kathryn. Adding the priority 11 like you suggested DID fix the tiny post icon issue. However, it also completely overrides the Theme Options –> Color Scheme setting. Regardless of the chosen color (I use Blue), the theme only renders the turquoise color.

    Any advice?

    Thanks,

    Jonathan

    Moderator Kathryn Presner

    (@zoonini)

    I’ll let you know what our developers say.

    In the meantime, you might like to use the @import method of adding styles from the parent to a child theme instead of the enqueuing method. It should work fine.

    i.e. remove the enqueuing function and add this line at the top of your child’s style.css, below the template information:

    @import url("../writr/style.css");

    Thread Starter jkshay

    (@jkshay)

    Thanks, Kathryn. Removing the enqueuing method from functions.php and adding the @import line referenced above to my style.css DID fix the tiny icon issue and lets me keep the blue theme options color.

    I’m interested to know what the developers might have to say. From what I understand, the enqueuing method is faster. Is this correct?

    Moderator Kathryn Presner

    (@zoonini)

    From what I understand, the enqueuing method is faster. Is this correct?

    In theory, yes, as it allows CSS styles to be loaded concurrently. But on most sites this is really not something that’s perceptible.

    We’ll keep you posted once our devs get to the ticket. Thanks!

    Moderator Kathryn Presner

    (@zoonini)

    This issue has been fixed and the update will be included in the next version of Writr.

    If you’d like to make the change yourself in the meantime, you could change line 1000 in style.css from this:

    .entry-format-badge {

    to this:

    .entry-format-badge.genericon

    That should allow you to return to the enqueued child theme method while not affecting the icon size.

    Let us know if you have any trouble with it.

    Thread Starter jkshay

    (@jkshay)

    Kathryn-

    Thanks so much for the follow up! I just implemented your suggested changes and reverted to the enqueued child theme method with no issues.

    I really appreciate it!

    Moderator Kathryn Presner

    (@zoonini)

    Awesome. ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Post icons in child theme are tiny’ is closed to new replies.