[Resolved] Weird thing with Child Theme

Home Forums Support [Resolved] Weird thing with Child Theme

Home Forums Support Weird thing with Child Theme

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1256719
    Gary

    Hi Guys

    I had a weird WordFence alert today telling me my child theme needed an update from version 1.0 to version 1.0.5. I logged in to WordPress and I could see the update.

    I created this child theme and I know that there is no update to it, so to get round the issue I simply renamed the child theme to version 1.0.5 and the update went away. But my question is do you have any idea why this would happen?

    I have done a WordFence scan and nothing malicious was found but I am guessing that this update must be malicious in some way, i.e. making me somehow install something malicious. I know this is just a guess so if you could shed any light on it I would appreciate it.

    For the record this child theme only contains CSS rules and two very simply functions.

    Cheers

    Gary

    #1256739
    Leo
    Staff
    Customer Support

    Hi there,

    I’m not sure, unfortunately.

    You can try using our default child theme here:
    https://docs.generatepress.com/article/using-child-theme/

    It’s version 0.1 and it won’t ever need to change as child theme doesn’t need to be updated.

    #1256756
    Gary

    Hi Leo

    I have got to the bottom of this using a local version of the site.

    There is a theme in the WordPress repository called something very similar, it is called Foresight. Now my theme is called something a little different but the first word is Foresight. For some reason WordPress thinks they are the same theme.

    When I click to get more information about the update I see a completely different theme, so it looks like I did the right thing just changing my version number, weird!

    Anyway I have just had a look at your child theme and it includes some things in the functions.php file that I have never added to any GeneratePress I have created and they have always worked, namely:

    function generatepress_child_enqueue_scripts() {
    if ( is_rtl() ) {
    wp_enqueue_style( ‘generatepress-rtl’, trailingslashit( get_template_directory_uri() ) . ‘rtl.css’ );
    }
    }
    add_action( ‘wp_enqueue_scripts’, ‘generatepress_child_enqueue_scripts’, 100 );

    Can I ask does it matter that I have not added these functions? It has never been an issue in the past.

    Cheers

    Gary

    #1256835
    Leo
    Staff
    Customer Support

    Yup you don’t need that snippet if your site isn’t a RTL.

    #1257551
    Gary

    Thanks Leo that’s great!

    #1258255
    Leo
    Staff
    Customer Support

    No problem 🙂

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