How to show CPALead to specific WordPress Categories?
After reading some blog posts about the success of people using CPALead, I decided to join also and try it out. I just joined a few minutes ago so I could not do a review yet. However, I can help you by showing you how to install CPALead on your wordpress blog.
Here in my blog, I wanted to add CPAlead but I don’t want it to show up in every posts. I only handpicked a few posts where I want to add their code. You can find it in my new category called “Premium”.
My goal here is to limit the codes to show up in the premium category only so I did some modifications in my template. Here is how I did it.
First is that you should check what is the category ID of your category. You can find tis value when you click on categories [/wp-admin/categories.php] and the column is ID. For example, premium category is ID # 22.
Now edit your template and find the file “header.php” (this is where you should put the cpalead code as instructed by their website).
Now add this code there
if (in_category( replace me with the category ID you got))
//cpalead – replace me with your cpalead code
That is all you need to do and it will start showing up in your premium categories only. So to make a post have a cpalead script, just add it to that category.
Let me know if you have further questions.
Till next time,