Title: Link css through a function
Last modified: August 30, 2016

---

# Link css through a function

 *  Resolved [Mimmie flower](https://wordpress.org/support/users/mimmie-flower/)
 * (@mimmie-flower)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/link-css-through-a-function/)
 * Hi everyone,
    Help needed 😀 I am trying to link my style.css through the function.
   php but that is not working, My code is:
 * <?php
    /** * Enqueue scripts and styles. */ function csslinktheme() {
 *  // Enqueue default style
    wp_enqueue_style(‘style_css’, get_stylesheet_uri());}
 * add_action( ‘wp_enqueue_scripts’, ‘csslinktheme’ );
 * get_stylesheet_uri();
 * Without the last line it does not work either
 * Any ideas? Thanks a lot

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [prabhukb](https://wordpress.org/support/users/prabhukb/)
 * (@prabhukb)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/link-css-through-a-function/#post-6619105)
 * Hello,
    Check the URL: [https://codex.wordpress.org/Child_Themes](https://codex.wordpress.org/Child_Themes)
 *  [codemovement.pk](https://wordpress.org/support/users/codemovementpk/)
 * (@codemovementpk)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/link-css-through-a-function/#post-6619111)
 * Hi
 * here is an example from one of my project to make things simple for you.
    wp_register_style(‘
   load_responsive_css’, get_template_directory_uri().’/style-responsive.css’); 
   wp_enqueue_style(‘load_responsive_css’);
 * style-responsive.css is lying in the root of my theme folder.
    e.g my-theme/style-
   responsive.css
 *  Thread Starter [Mimmie flower](https://wordpress.org/support/users/mimmie-flower/)
 * (@mimmie-flower)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/link-css-through-a-function/#post-6619403)
 * Thank you very much I fixed it.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Link css through a function’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [function](https://wordpress.org/support/topic-tag/function/)
 * [link](https://wordpress.org/support/topic-tag/link/)
 * [style](https://wordpress.org/support/topic-tag/style/)

 * 3 replies
 * 3 participants
 * Last reply from: [Mimmie flower](https://wordpress.org/support/users/mimmie-flower/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/link-css-through-a-function/#post-6619403)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
