html - Page Template PHP file not linking CSS file -
i have php file , in linking html file.
include 'practice.html'; in html file have few css files linked.
<link href="practice1.css" rel="stylesheet" /> <link href="practice2.css" rel="stylesheet" /> now, happening page template displaying html part , not able access css files.
how can possibly use css files?
ps : php, html, , css files under same folder (wordpress\wp-content\themes\*).
on php template page, use:
<?php require(templatepath.'\practice.html'); ?> and on html page, use:
<link href="\wordpress\wp-content\themes\yourthemename\practice1.css" rel="stylesheet"> <link href="\wordpress\wp-content\themes\yourthemename\practice2.css" rel="stylesheet"> make sure replace yourthemename with, theme's name. , provide correct path of css files located.
if wondering templatepath does, provides path template in use wordpress not have type out full path ex. \wordpress\wp-content\themes\yourthemename\
are working on local server or live website? depending on 1 is, have change paths.
example:
for live website use:
/wordpress/wp-content/themes/yourthemename/ or
for local server use:
\wordpress\wp-content\themes\yourthemename\
Comments
Post a Comment