<if condition="$thread[forumid] =='A' || $thread[forumid] =='B' || $thread[forumid] =='C'"> Google Adsense Code here. </if>