[gnome-web-www] add support to use custom css in pages and posts with custom_css field
- From: Vinicius Scopel Depizzol <vdepizzol src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-web-www] add support to use custom css in pages and posts with custom_css field
- Date: Mon, 30 Jan 2012 23:16:17 +0000 (UTC)
commit 438edde53c348c7e92cf8095232ca380287c8fc1
Author: Vinicius Depizzol <vdepizzol gmail com>
Date: Mon Jan 30 21:15:51 2012 -0200
add support to use custom css in pages and posts with custom_css field
theme/header.php | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/theme/header.php b/theme/header.php
index fa9f9fb..6d9a69d 100644
--- a/theme/header.php
+++ b/theme/header.php
@@ -31,6 +31,19 @@ if (function_exists('wppo_get_lang')) {
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/template.js"></script>
<?php wp_head(); ?>
+
+<?php
+
+if (is_single()) {
+ $custom_css = get_post_meta($post->ID, 'custom_css', true);
+ if (!empty($custom_css)) {
+ echo '<style type="text/css">'."\n";
+ echo $custom_css."\n";
+ echo '</style>'."\n";
+ }
+}
+
+?>
</head>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]