• Resolved kovetania

    (@kovetania)


    Hi There, I know there are many answers however my head is just so confused with all of the different posts I have read.

    I have turned our website Parent theme (Shop isle) into a child theme use child themify, and when I go to appearances in the www.ads-software.com dashboard and editor all I have is this:

    /*
    Theme Name: Shopisle-Child
    Version: 1.0
    Description: A child theme of Shop Isle
    Template: shop-isle
    */

    @import url(“../shop-isle/style.css”);

    Can I add codes/commands underneath all of the above text to do things to our website eg adding a search bar at the top of the page etc? website is https://www.dfsi.co.nz

    Any help is greatly appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Yes, make the child theme the active theme but keep the parent theme as an inactive theme.

    If you have setup your child theme correctly, you shouldn’t need to be importing the CSS stylesheet from within your child theme CSS file, that should be enqueued within your child theme functions.php file.

    The Child Themes reference page shows you precisely how to create your child theme correctly.

    For example, your functions.php should look like this:

    function my_child_styles() {
        wp_enqueue_style('parent-theme-css', get_template_directory_uri() . '/style.css');
        wp_enqueue_style('child-theme-css', get_stylesheet_directory_uri() . '/style.css', array('parent-theme-css'));
    }
    add_action('wp_enqueue_scripts', 'my_child_styles');

    And in your style.css file:

    /*
    Theme Name: Shopisle-Child
    Version: 1.0
    Description: A child theme of Shop Isle
    Template: shop-isle
    */

    You can then add your custom CSS code to this stylesheet, below the theme information text. This CSS code will override all parent theme CSS but will be preserved should you update the parent theme in the future.

    Hope this helps.

    Thread Starter kovetania

    (@kovetania)

    That’s great thank you for that Ill try adding some things in that page now as I used Child Themify to create the child theme which is currently active but I have no functions.php in the WP Dashboard so do I need to add that to the dashboard separately? Thanks

    It isn’t advised to edit PHP files using the WordPress editor, it can cause problems if you make the slightest error, even simple typo’s can lock you out of your Dashboard.

    You should connect to your server via an FTP client or your hosts’ File Manager software (cPanel, Plesk) and download your child theme to your computer.

    You can then use Notepad (or any other text editor) to safely modify your files, just upload them to your server (overwiting the originals) for the changes to take effect.

    You can also make use of an IDE that connects to your server allowing you to modify files directly on your server.

    Be sure to regularly make back-up’s too.

    Hope this helps.

    Thread Starter kovetania

    (@kovetania)

    Thank you very much ill give that a go

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Modify child themes – Very New to WordPress’ is closed to new replies.