Advertisement:

Author Topic: SOLVED >Osclasswizards Theme Adsense Ads Number under categories / subcategories  (Read 958 times)

mrtsoftware

  • Sr. Member
  • ****
  • Posts: 343
Osclasswizards Theme Adsense Ads Number under categories / subcategories;
I noticed that wizards theme is showing 2 ads as sub-sub on the top. is this normal? Normally showing 1 adsense ads is ideal. 1 is on top 1 is on bottom,

How to remove this one of this twin adsense ads top of under categories / sub categories?

Please see secreenshoot.
« Last Edit: October 14, 2017, 12:37:01 am by mrtsoftware »

Aficionado

  • Guest
Re: Osclasswizards Theme Adsense Ads Number under categories / subcategories
« Reply #1 on: October 07, 2017, 11:35:18 am »
Yes it is normal, meaning is by design (wrong imho). Apparently to cover also the premium ads at top.

I'm pretty sure this can be fixed by editing some code in some file. If i have the time i will search for it later.
« Last Edit: October 07, 2017, 11:56:50 am by Aficionado »

Aficionado

  • Guest
Re: Osclasswizards Theme Adsense Ads Number under categories / subcategories
« Reply #2 on: October 07, 2017, 12:33:31 pm »
or a better way is to check IF there is a premium ad and ONLY then show two ads.

I will have to take a look at that.

Aficionado

  • Guest
Re: Osclasswizards Theme Adsense Ads Number under categories / subcategories
« Reply #3 on: October 07, 2017, 12:50:33 pm »
Ok, in "search.php" the code is at

Code: [Select]
    <div class="ads_search_top"> <?php echo osc_get_preference('search-results-top-728x90''osclasswizards_theme'); ?></div>
    <?php ?>
    <?php
            $i 
0;
            
osc_get_premiums(osclasswizards_premium_listings_shown());
            if(
osc_count_premiums() > 0) {
            echo 
'<h5 class="title">'.__('Premium listings',OSCLASSWIZARDS_THEME_FOLDER).'</h5>';
?>

    <?php 

            
View::newInstance()->_exportVariableToView("listType"'premiums');
            
View::newInstance()->_exportVariableToView("listClass",$listClass.' premium-list');
            
osc_current_web_theme_path($loop_template);
            }
        
?>

    <?php if( osc_get_preference('search-results-top-728x90''osclasswizards_theme') != ""){ ?>
    <div class="ads_search_top"> <?php echo osc_get_preference('search-results-top-728x90''osclasswizards_theme'); ?></div>
    <?php ?>
    <?php if(osc_count_items() > 0) {
        echo 
'<h5 class="title titles">'.__('Listings',OSCLASSWIZARDS_THEME_FOLDER).'</h5>';
?>

You can remove one of them as a quick fix to your problem.

Code: [Select]
<div class="ads_search_top"> <?php echo osc_get_preference('search-results-top-728x90''osclasswizards_theme'); ?></div>

mrtsoftware

  • Sr. Member
  • ****
  • Posts: 343
Re: Osclasswizards Theme Adsense Ads Number under categories / subcategories
« Reply #4 on: October 07, 2017, 01:01:15 pm »
Thank you Aficionado@
Solved, it seems that this code was duplicated in search.php

Aficionado

  • Guest
Re: Osclasswizards Theme Adsense Ads Number under categories / subcategories
« Reply #5 on: October 07, 2017, 01:02:10 pm »
Thank you Aficionado@
Solved, it seems that this code was duplicated in search.php

Or change line 116
to

Code: [Select]
<?php if( osc_get_preference('search-results-top-728x90''osclasswizards_theme') != "" && (osc_count_premiums() > 0)) { ?>
« Last Edit: October 07, 2017, 01:10:48 pm by Aficionado »

Aficionado

  • Guest
Re: Osclasswizards Theme Adsense Ads Number under categories / subcategories
« Reply #6 on: October 07, 2017, 01:03:16 pm »
Thank you Aficionado@
Solved, it seems that this code was duplicated in search.php

it is not duplicated by mistake, it is because you may have Premium ads between the 2 adsense blocks. So a check was needed.

If anyone else has a better idea or solution .... please help. I hope my small code change is correct, i'm not a programmer.
« Last Edit: October 07, 2017, 01:09:33 pm by Aficionado »

mrtsoftware

  • Sr. Member
  • ****
  • Posts: 343
Re: Osclasswizards Theme Adsense Ads Number under categories / subcategories
« Reply #7 on: October 07, 2017, 07:14:49 pm »
I have no premium ads, that's way I removed one, and solved...
In future if I have premium ads, I replace code.