*

Romeo

  • ****
  • 115 posts
Personals category
« on: April 18, 2017, 06:53:38 PM »
It is possible to hide ads personals category. Not be displayed than in their category page, but hidden in the pages of search home.
The What if post ads containing most vulgar or indecent pics are not visible throughout the site.

Marked as best answer by Romeo on April 19, 2017, 05:25:32 PM
*

MB Themes

Re: Personals category
« Reply #1 on: April 19, 2017, 10:49:29 AM »
@Romeo
It require a lot of skills with osclass and lot of work in theme to have it done. Look for developer for this kind of work.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Romeo

  • ****
  • 115 posts
Re: Personals category
« Reply #2 on: April 21, 2017, 08:35:06 PM »
To hide ads from the Matrimonial section or a category that contains audiences over 18 years old, please add this to the very bottom of your theme.php (please do not leave blank lines after this):



The only problem is that it is also looking to be adapted to the search page


Code: [Select]
<?php
function cust_exclude_from_latest() {

    if (
osc_is_home_page()  ) {

        
$admin_categories = array(7697071727374); // Put here a list of category ID's
        
        
$mSearch =  Search::newInstance();
        
$mSearch->addConditions(sprintf("%st_item.fk_i_category_id NOT IN (%s)"DB_TABLE_PREFIXimplode(','$admin_categories)) );
    }
}

osc_add_hook('init''cust_exclude_from_latest');
?>
« Last Edit: April 21, 2017, 08:44:14 PM by Romeo »