Home Forums WordPress Plugins Hide My WP I still see my theme name from inspect element

This topic is: resolved
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #3920
    spatdesign
    Post count: 10

    Hello.
    The plugin works great for sites like “what wp theme is that” or “wp theme detector”, but with “inspect element” of Chrome I still see the path in a compact form (without wp-content/themes/) but with the real name of my theme.
    e.g. http://www.mysite.com/myrealtheme/style.css
    How can I fix this? Maybe I don’t have configured properly the settings.
    Thanks for your assistance
    Regards

    #3933
    Suman M.
    Post count: 12480

    Hi, can you please let us know your website URL and the page source line number where we can see the theme name?

    #3938
    spatdesign
    Post count: 10
    This reply has been marked as private.
    #3944
    Suman M.
    Post count: 12480

    It is because the name “peak” is hard-coded in child theme’s css file http://www.claudiocaglioti.com/template/sd_main.css

    We recommend you to change the theme folder names to something like “claudiocaglioti” and “claudiocaglioti-child”, and make changes to child theme’s css accordingly.

    #3946
    spatdesign
    Post count: 10
    This reply has been marked as private.
    #3948
    Suman M.
    Post count: 12480

    It’s because the parent theme name is hard-coded in child theme css. If you do not want to rename theme directories then you can do the following:

    – remove the following line from child theme’s css file:

    @import url(“../peak/style.css”);

    – add following code in child theme’s function.php

    add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_style’ );
    function enqueue_parent_style() {
    wp_enqueue_style( ‘parent-theme-css’, get_template_directory_uri() . ‘/style.css’ );
    }

    #3958
    spatdesign
    Post count: 10
    This reply has been marked as private.
    #3962
    spatdesign
    Post count: 10
    This reply has been marked as private.
    #3963
    Suman M.
    Post count: 12480

    That should work! Might be you have missed something.

    And regarding the scrambled website after you reverted back, it seems like you missed to add back following line in your child theme’s css file:
    @import url(“../peak/style.css”);

    #3964
    Suman M.
    Post count: 12480

    Yes, it’s because of hardcoded theme name in css file. Yes, it’s preferred to use the method via function.php rather than via css, and most of the good themes use this function method.

    #3965
    spatdesign
    Post count: 10
    This reply has been marked as private.
Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.