Custom CSS causing syntax error
-
Hi,
I am trying to increase my knowledge by building a custom template for a page on my site Freetastic where this one page brings up a different CSS style to all the others.
This page is intended to act an article/blog section to the site so the post presentation needs to be different. I have created an Article category and added this to the temple to call up just posts under that cat (this was taken from a similar page a friend made for me):
‘<?php if(is_category(’23’)) continue; ?>’
It worked, it listed items from category 23 but in the ‘offers’ format. In a bid to change that I have built this from some online guides:
‘<?php
if(is_category(’23’))
{
<link rel=”stylesheet” href=”https://www.freetastic.co.uk/wp-content/theme/freetastic/style2.css” type=”text/css” media=”screen” />
} else {
<link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?><” type=”text/css” media=”screen” />
}
?>’
This has created a syntax error but I am not sure why:‘Parse error: syntax error, unexpected ‘<‘ in /home/freetast/public_html/wp-content/themes/freetastic/articles.php on line 21’
Any suggestions would be greatly appreciated. I can go to our developer if need be but I would like to get hands on experience of the basics myself.
- The topic ‘Custom CSS causing syntax error’ is closed to new replies.