I am new to WordPress, so apologises if this is has been dealt with before: I have searched around for a couple of hours and have not yet found an answer.
I want to include a different block of text (it will be introductory text) on each category page. Each block of text is associated with one category only.
I think this is probably best achieved by adding some code to the index.php file, just after the line
To include the text I will use the php include function (I have actually got this working as:
<?php include(‘my_block_of_text.php’); ?>
This is the result:
What I can not work out is how to include a different block of text for each category. My thinking is that an ‘if’ or ‘switch’ statement might do the trick, but I am not sure what I will be testing for i.e. $cat=”1″ or something else
Any suggestions, links to others work, would be gratefully appreciated.
- You must be logged in to reply to this topic.