Results 1 to 2 of 2

Thread: Only show the categories list on the first page

  1. #1
    Thread Starter
    foundationmedia's Avatar
    Join Date
    Jun 2011
    Location
    United Kingdom
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Only show the categories list on the first page

    I have been asked by some of our site users if the category list could just be shown on the first page and not on pages 2, 3, 4 etc... (Using CP 3.13)

    you just need to add a tiny bit of code to the index.php file. Replace the following code:
    Code:
    <?php if ( get_option('cp_home_layout') == 'directory' ) : ?>
    
                    <div class="shadowblock_out">
    
                        <div class="shadowblock">
    
                            <h2 class="dotted"><?php _e('Ad Categories','appthemes')?></h2>
    
                            <div id="directory" class="directory <?php if(get_option('cp_cat_dir_cols') == 2) echo 'two'; ?>Col">
    
    
                                <?php echo cp_cat_menu_drop_down(get_option('cp_cat_dir_cols'), get_option('cp_dir_sub_num')); ?>
    
    
                                <div class="clr"></div>
    
                            </div><!--/directory-->
    
                        </div><!-- /shadowblock -->
    
                    </div><!-- /shadowblock_out -->
    
                <?php endif; ?>
    with this:
    Code:
    <?php if ( get_option('cp_home_layout') == 'directory' ) : ?>
                
                <?php
            $currentpage = $_SERVER['REQUEST_URI'];
            if($currentpage=="/" || $currentpage=="/index.php" || $currentpage=="" ) :?>
    
                    <div class="shadowblock_out">
    
                        <div class="shadowblock">
    
                            <h2 class="dotted"><?php _e('Ad Categories','appthemes')?></h2>
    
                            <div id="directory" class="directory <?php if(get_option('cp_cat_dir_cols') == 2) echo 'two'; ?>Col">
    
    
                                <?php echo cp_cat_menu_drop_down(get_option('cp_cat_dir_cols'), get_option('cp_dir_sub_num')); ?>
    
    
                                <div class="clr"></div>
    
                            </div><!--/directory-->
    
                        </div><!-- /shadowblock -->
    
                    </div><!-- /shadowblock_out -->
    
                <?php endif; ?>
                 <?php endif; ?>

  2. #2
    Veteran barukar's Avatar
    Join Date
    Sep 2010
    Location
    Brasil, São Paulo, SP
    Posts
    6,785
    Thanks
    186
    Thanked 742 Times in 623 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    -------------------------------------------------------------------------------------------
    Projects: ClassiNoiva - Classimóveis - vocênoenem - i50 - Clube DETRAN

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Show categories on sidebar on ad page, can't add widget
    By classbr in forum Report ClassiPress Bugs
    Replies: 3
    Last Post: March 12th, 2011, 09:47 AM
  2. [MOD NEEDED] show list of ads from query of custom field in a tab on home page
    By iamfabian in forum ClassiPress General Discussion
    Replies: 2
    Last Post: January 15th, 2011, 10:42 PM
  3. Replies: 1
    Last Post: September 9th, 2010, 04:55 PM