Results 1 to 2 of 2

Thread: Replacement Classipress sidebar-ad.php File

  1. #1
    Thread Starter
    Veteran demonlee's Avatar
    Join Date
    Mar 2011
    Location
    Antas, Spain
    Posts
    574
    Thanks
    6
    Thanked 51 Times in 46 Posts

    Replacement Classipress sidebar-ad.php File

    This is the replacement code for sidebar-ad.php to show just a single tab with Google Map, it will then still allow you to place additional widgets below the map.

    [START CODE]
    <?php
    global $userdata, $app_abbr, $gmap_active;

    // make sure google maps has a valid address field before showing tab
    $custom_fields = get_post_custom();
    if ( !empty($custom_fields[$app_abbr.'_zipcode']) || !empty($custom_fields[$app_abbr.'_country']) ||
    !empty($custom_fields[$app_abbr.'_state']) || !empty($custom_fields[$app_abbr.'_city']) ||
    !empty($custom_fields[$app_abbr.'_street']) ) {
    $gmap_active = true;
    }

    ?>

    <!-- right sidebar -->
    <div class="content_right">

    <div class="tabprice">

    <ul class="tabnavig">
    <?php if ( $gmap_active ) { ?>
    <li><a href="#priceblock1"><span class="big"><?php _e('Map', 'appthemes') ?></span></a></li>
    <?php } ?>
    </ul>

    <?php if ( $gmap_active ) { ?>

    <!-- tab 1 -->
    <div id="priceblock1">

    <div class="clr"></div>

    <div class="singletab">

    <?php include_once ( TEMPLATEPATH . '/includes/sidebar-gmap.php' ); ?>
    <?php } ?>

    </div><!-- /singletab -->

    </div><!-- /priceblock1 -->

    </div><!-- /tabprice -->

    <div class="clr"></div>

    <?php appthemes_before_sidebar_widgets(); ?>

    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('sidebar_listing') ) : else : ?>

    <!-- no dynamic sidebar so don't do anything -->

    <?php endif; ?>

    <?php appthemes_after_sidebar_widgets(); ?>


    </div><!-- /content_right -->
    [END]

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,982
    Thanks
    170
    Thanked 3,408 Times in 3,279 Posts
    Thanks for sharing.
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [MOD NEEDED] Just 'Map' in sidebar-ad.php file
    By demonlee in forum ClassiPress General Discussion
    Replies: 3
    Last Post: July 17th, 2011, 10:37 AM
  2. Slider replacement??
    By an_roks in forum ClassiPress General Discussion
    Replies: 3
    Last Post: July 7th, 2010, 12:56 PM
  3. Slider replacement??
    By an_roks in forum Help Using ClassiPress
    Replies: 0
    Last Post: December 31st, 1969, 07:00 PM