HTML inside PHP file not loading external CSS file

admin

Administrator
Staff member
I haven't coded for a long time and my skills are basic.
I got a php file. It's a section file from a wordpress theme i am customizing.

My problem is. Made the code to link to an external css file to customize the social media icons, but it's not loading the CSS!

<h2>Here's the code:</h2>

Code:
&lt;!DOCTYPE html&gt;
&lt;html lang = "en-US"&gt;
 &lt;head&gt;
 &lt;meta charset = "UTF-8"&gt;
&lt;link rel="stylesheet" type="text/css" href="D:\xampp\htdocs\alfasteel.pt\wp-content\themes\onetone\css\socialmedia.css" /&gt;
 &lt;/head&gt;
 &lt;body&gt;


          &lt;div class="footer-social-icons"&gt;
    &lt;h4 class="_14"&gt;Follow us on&lt;/h4&gt;
    &lt;ul class="social-icons"&gt;
        &lt;li&gt;&lt;a href="" class="social-icon"&gt; &lt;i class="fa fa-facebook"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="" class="social-icon"&gt; &lt;i class="fa fa-twitter"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="" class="social-icon"&gt; &lt;i class="fa fa-rss"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="" class="social-icon"&gt; &lt;i class="fa fa-youtube"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="" class="social-icon"&gt; &lt;i class="fa fa-linkedin"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="" class="social-icon"&gt; &lt;i class="fa fa-google-plus"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;

<hr>

Here's the whole file code in case you need it:

<hr>

Code:
&lt;!DOCTYPE html&gt;
&lt;html lang = "en-US"&gt;
 &lt;head&gt;
 &lt;meta charset = "UTF-8"&gt;
&lt;link rel="stylesheet" type="text/css" href="D:\xampp\htdocs\alfasteel.pt\wp-content\themes\onetone\css\socialmedia.css" /&gt;
 &lt;/head&gt;
 &lt;body&gt;


&lt;?php
 global $onetone_animated, $onetone_section_id, $allowedposttags;   
 $i                   = $onetone_section_id ;
 $section_title       = onetone_option( 'section_title_'.$i );
 $section_menu        = onetone_option( 'menu_title_'.$i );
 $section_content     = onetone_option( 'section_content_'.$i );
 $content_model       = onetone_option( 'section_content_model_'.$i);
 $section_subtitle    = onetone_option( 'section_subtitle_'.$i );
 $left_content        = onetone_option( 'section_left_content_'.$i );
 $right_content       = onetone_option( 'section_right_content_'.$i );

 if( !isset($section_content) || $section_content=="" ) 
    $section_content = onetone_option( 'sction_content_'.$i );


        if( $content_model == '0' || $content_model == ''  ):
        ?&gt;

         &lt;?php if( $section_title != '' || (function_exists('is_customize_preview') &amp;&amp; is_customize_preview()) ):?&gt;
       &lt;?php  
           $section_title_class = '';
           if( $section_subtitle == '' &amp;&amp; !(function_exists('is_customize_preview') &amp;&amp; is_customize_preview()))
           $section_title_class = 'no-subtitle';
        ?&gt;
       &lt;h2 class="section-title &lt;?php echo esc_attr($section_title_class); ?&gt; &lt;?php echo 'section_title_'.$i;?&gt;"&gt;&lt;?php echo wp_kses($section_title, $allowedposttags);?&gt;&lt;/h2&gt;
        &lt;?php endif;?&gt;
        &lt;?php if( $section_subtitle != '' || (function_exists('is_customize_preview') &amp;&amp; is_customize_preview()) ):?&gt;
        &lt;div class="section-subtitle &lt;?php echo 'section_subtitle_'.$i;?&gt;"&gt;&lt;?php echo do_shortcode(wp_kses($section_subtitle, $allowedposttags));?&gt;&lt;/div&gt;
         &lt;?php endif;?&gt;
         &lt;div class="home-section-content"&gt;

          &lt;div class="footer-social-icons"&gt;
    &lt;h4 class="_14"&gt;Follow us on&lt;/h4&gt;
    &lt;ul class="social-icons"&gt;
        &lt;li&gt;&lt;a href="" class="social-icon"&gt; &lt;i class="fa fa-facebook"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="" class="social-icon"&gt; &lt;i class="fa fa-twitter"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="" class="social-icon"&gt; &lt;i class="fa fa-rss"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="" class="social-icon"&gt; &lt;i class="fa fa-youtube"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="" class="social-icon"&gt; &lt;i class="fa fa-linkedin"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="" class="social-icon"&gt; &lt;i class="fa fa-google-plus"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;



         &lt;div class="row"&gt;
         &lt;div class="col-md-8"&gt;&lt;div class="&lt;?php echo $onetone_animated;?&gt; &lt;?php echo 'section_left_content_'.$i;?&gt;" data-animationduration="0.9" data-animationtype="fadeInLeft" data-imageanimation="no"&gt;&lt;?php echo do_shortcode($left_content);?&gt;&lt;/div&gt;&lt;/div&gt;
         &lt;div class="col-md-4"&gt;&lt;div class="&lt;?php echo $onetone_animated;?&gt; &lt;?php echo 'section_right_content_'.$i;?&gt;" data-animationduration="0.9" data-animationtype="fadeInRight" data-imageanimation="no"&gt;&lt;?php echo do_shortcode($right_content);?&gt;&lt;/div&gt;&lt;/div&gt;
         &lt;/div&gt;
          &lt;/div&gt;
           &lt;?php
        else:
        ?&gt;
        &lt;?php if( $section_title != '' || (function_exists('is_customize_preview') &amp;&amp; is_customize_preview()) ):?&gt;
        &lt;div class="section-title &lt;?php echo 'section_title_'.$i;?&gt;"&gt;&lt;?php echo esc_attr($section_title);?&gt;&lt;/div&gt;
        &lt;?php endif;?&gt;

            &lt;div class="home-section-content &lt;?php echo 'section_content_'.$i;?&gt;"&gt;
            &lt;?php 
            if(function_exists('Form_maker_fornt_end_main'))
             {
                 $section_content = Form_maker_fornt_end_main($section_content);
              }
             echo do_shortcode(wp_kses($section_content, $allowedposttags));
            ?&gt;
            &lt;/div&gt;
              &lt;?php 
        endif;
        ?&gt;      

 &lt;/body&gt;
&lt;/html&gt;