*

A.M

  • ***
  • 34 posts
Hello there...

can anyone help me with something please?

i need php code doing this:

if category id(5): {
do somthing!
else if category id(11): {
do somthing!
}

have anyone an idea about this?
iloveOsclass

Marked as best answer by Ammar Albadri on November 06, 2022, 04:02:44 AM
*

MB Themes

Re: i need php code if category id(5): { do somthing!, can anyone help?
« Reply #1 on: November 03, 2022, 04:06:19 PM »
@Ammar Albadri
Code: [Select]
<?php if(osc_item_category_id() == 5) { ?>

..something..

<?php } else if (osc_item_category_id() == 11) { ?>

... something ..

<?php ?>

Maybe you must change osc_item_category_id to correct function.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

A.M

  • ***
  • 34 posts
Re: i need php code if category id(5): { do somthing!, can anyone help?
« Reply #2 on: November 06, 2022, 04:13:22 AM »
its work, thank you
iloveOsclass

*

Ajit Sahane

  • ****
  • 178 posts
  • https://bestclassifiedsusa.com
Re: i need php code if category id(5): { do somthing!, can anyone help?
« Reply #3 on: January 09, 2023, 01:31:09 PM »
Yes this is must required. Adsense ads need to restrict for some sensual categories here its help.

Now all pages ads showing and hard to restrict specific category + inside ads pages.

Hope next version inbuilt option available.