[wp-hackers] Dynamic Style Sheets

Computer Guru computerguru at neosmart.net
Sun Apr 29 07:50:13 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matt wrote:
> Why can't you do something like this in header.php:
> 
> <?php
> if (is_single()) {
> // your checking or whatever here
> // something like if (whatever) {
> echo '<link rel="stylesheet" href="path/to/single_stylesheet.css" />';
> //}
> ?>

Even better:

<?php

if (is_single()) {
....
echo  '<link rel="stylesheet" href="mycss.php?test_pass" />';
}
?>

You know, basically do all your testing in the WP php, then pass
whatever info you need to the CSS file as arguments at the end.

- --
Computer Guru
NeoSmart Technologies
http://neosmart.net/blog/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGNE413SICh4XKUt0RAov4AJ9wGAZKBdKW7LXbQVuVSydF7zA9cwCcC40V
U/rwvkEodIcYkAKJV0Ttxko=
=7GBE
-----END PGP SIGNATURE-----


More information about the wp-hackers mailing list