ClassiBase classifieds script › Forums › General help › How to exclude certain category id from listing in latest ad? › Reply To: How to exclude certain category id from listing in latest ad?
That is very difficult to do and not consistent functionality.
We can tell you where to make updates but cannot provide exact code to do it.
Latest and featured ads for widgets are populated in Widgets::widgetAds() model. Ads are selected from database in Ad::latestAds() and Ad::featuredByLocation() models.
You will have to make changes to queries used in latest 2 functions.
You probably need to add something like
$where .= ' AND category_id!=51'; just before using it to retrieve data.
We do not advise you making these changes because it may complicate functionality of script in future. You may face problem not seeing ads from bus category in any place.
So do it on your own risk. And keep in mind that changes made to script will be lost on script update.