WordPress.org

Ready to get started?Download WordPress

Forums

Coraline Template (7 posts)

  1. playing2012
    Member
    Posted 2 years ago #

    Which file is normally used to attach a custom.css file? I want to save all my custom css into a special file so that updating would be easier.

    Thanks.

  2. playing2012
    Member
    Posted 2 years ago #

    I should have also said that I have a self-hosted blog which I am working on at the momenet.

  3. playing2012
    Member
    Posted 2 years ago #

  4. Ziv
    Member
    Posted 2 years ago #

    I think what you would need to do is either add your CSS to style.css, or create a new CSS file and reference it in the header.

    Go to header.php and add this under the line that finds your main CSS.
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/custom.css" media="screen" />

    I think this would work, let me know if it does.

  5. Don't modify the header.php file on the original coraline directory. If the theme has an update, you will lose your changes.

    Which file is normally used to attach a custom.css file?

    There isn't one exactly. Create a child theme of Coraline and you can add all of the CSS customization in that child theme's seperate style.css file.

    Or in the child theme directory, make a copy of the Coraline header.php file and modify it there.

    But as you've only mentioned CSS, just adding your changes to the child theme's style.css would be the way to go.

  6. Ziv
    Member
    Posted 2 years ago #

    Good answer ^^

    Can you explain how to create add-on custom style that is not inside style.css? I am not sure if what I wrote would work, can you confirm?

  7. Can you explain how to create add-on custom style that is not inside style.css?

    There are lots of ways to do it, I'm just really fond of child themes. ;)

    If it's just CSS changes, then you can use a plugin to insert the CSS into the head.

    http://wordpress.org/extend/plugins/search.php?q=custom+CSS

    That won't create a custom.css file, it will put the CSS into the database as an option.

Topic Closed

This topic has been closed to new replies.

About this Topic