Custom css for article
February 3, 2010 by admin · Leave a Comment
Each article is a challenge and can bring new ways for you to show information.
So if you need to present different articles with different CSS then you can do the following work:
Add to header.php file the next code:
<?php if (is_single()) {
$customstyle = get_post_meta($post->ID, 'customstyle', true);
if (!empty($customstyle)) { ?>
<style type="text/css">
<?php echo $customstyle; ?>
<style>
<?php }
} ?>
Then you could add for every article a field called customstyle and add there you css style.
Related posts: