• Resolved johannes999

    (@johannes999)


    Hello,
    I have uploaded foundation css file with Filezilla to my theme test directory.
    it is under the test directory.
    now I want to make a link to foundatiion css in my head section of header.php
    so I made a link like this: <link rel=”stylesheet” href=”css/foundation.css” />
    it is not working.
    so I changed to: <link rel=”stylesheet” href=”test/foundation.css” />
    it is not working either.
    what I have to do to solve this problem.
    the tree is like this : wp-content/themes/test/foundation.css.
    thanks
    johan

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @johannes999

    Please add below code in your test theme header.php file in link tag like:

    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_directory’);?>/foundation.css” />

    • This reply was modified 5 years, 2 months ago by Tanveer khan.
    • This reply was modified 5 years, 2 months ago by Tanveer khan.
    Thread Starter johannes999

    (@johannes999)

    thanks,
    I putted under head section .but it is not working either.
    it is foundation css grid file.
    do I have to enqueue it ,if yes how?
    johan

    Hello @johannes999

    You can add this code in functions.php

    function my_theme_enqueue_styles(){
    
    wp_enqueue_style( 'foundation-css', get_template_directory_uri() . '/foundation.css', array(), "6.4.1", 'all' );
    
    }
    add_action('wp_enqueue_scripts','my_theme_enqueue_styles');
    Thread Starter johannes999

    (@johannes999)

    thanks.
    it works

    johan

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how I can make a link in head section of header.php?’ is closed to new replies.