racingtech:
I have an add (year make model) that I would like to show up on the certain pages but only when certain categories are selected.
How do I choose which page to add the code to or do I need to make an ezpage and link it to that.
The normal category page would be fine, but I don't need it to show up on all categories.
Thanks
There are three methods I can think of to do this, each with pros and cons.
- Provide the PHP code (properly wrapped in span or div tags) so that it shows up on each category, and then use CSS to hide it on all but the applicable categories. This can also be reversed to be always hidden but shown only on the select category(ies).
- Code the information to be shown only on the selected categories to be controlled by some "process" whether it be add the product to a category (display this ad) or by a new admin option, or by hard coding the category(ies).
- Use swguy's boilerplate template to add applicable code to say the category description and/or the product(s) that are to have that information.
I'm sure there are other ways as well, but that to me seems like a method to keep the work and result down to the area of concern...