Advertisement:

Author Topic: category on bender theme  (Read 7538 times)

diveshlalit

  • Guest
category on bender theme
« on: September 06, 2013, 01:26:13 pm »
how to make a catgory like below image

strata

  • Sr. Member
  • ****
  • Posts: 411
  • Always good, always...
Re: category on bender theme
« Reply #1 on: September 06, 2013, 02:45:00 pm »
What theme you install ?

diveshlalit

  • Guest
Re: category on bender theme
« Reply #2 on: September 06, 2013, 02:54:56 pm »
right now moderm but i want bender theme bcoz google not give me adsense account may be they not like my website

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: category on bender theme
« Reply #3 on: September 06, 2013, 04:37:04 pm »
@diveshlalit

Google Adsense team do not look on website design, but on website content, so:
 - you do not have unique content on website (duplicate nothing-telling listings)
 - your classified web is empty

Gilden

  • Sr. Member
  • ****
  • Posts: 464
  • Availability: 30%
Re: category on bender theme
« Reply #4 on: September 06, 2013, 09:52:40 pm »
You can have this look pretty much on any theme, you just have to edit the CSS for the categories (and get the images, of course).

diveshlalit

  • Guest
Re: category on bender theme
« Reply #5 on: September 07, 2013, 02:49:37 pm »
help

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: category on bender theme
« Reply #6 on: September 07, 2013, 03:32:19 pm »
search

strata

  • Sr. Member
  • ****
  • Posts: 411
  • Always good, always...
Re: category on bender theme
« Reply #7 on: September 07, 2013, 03:36:50 pm »
If you're using bender theme you need to modified your function.php find this line
 
Code: [Select]
    if( !function_exists('bender_draw_categories_list') ) {
       
        function bender_draw_categories_list(){ ?>       
        <?php if(!osc_is_home_page()){ 
            echo 
'<div class="resp-wrapper">';                     

        } 
?>
         
         <?php
        
        $total_categories   
osc_count_categories();
        
$col1_max_cat       ceil($total_categories/4);
        
?>

         <?php if(osc_is_home_page()){
            echo 
'<h1 class="home-title-header">Find What You Are Looking For !</h1>'
         }
?>

        <?php osc_goto_first_category();
        
         
$i      0;

         while ( 
osc_has_categories() ) {

         
?>


        <?php
            
if($i%$col1_max_cat == 0){
                if(
$i 0) { echo '</div>'; }
                if(
$i == 0) {
                   echo 
'<div class="cell_3 first_cel">';
                } else {
                    echo 
'<div class="cell_3">';
                }
            }
        
?>


        <ul class="r-list">
          <li>
            <a class="category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>">
                <img src="<?php echo osc_current_web_theme_url('icons/maincategoryicons/') . osc_category_name() .'.png' ?>"  alt="" title=""/></a>               
                <span class="category <?php echo osc_category_slug() ; ?>"></span>
                <p><a href="<?php echo osc_search_category_url() ; ?>">
                <?php echo osc_category_name() ; ?></a></p>

                 <?php /**/if ( osc_count_subcategories() > ) { ?>
                   <ul class="category">
                         <?php while ( osc_has_subcategories() ) { ?>
                             <li>
                             <?php if( osc_category_total_items() > ) { ?><a class="category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>"><?php echo osc_category_name() ; ?></a>
                             <?php } else { ?><span><?php echo osc_category_name() ; ?></span></li>
                             <?php ?>
                         <?php ?>
                   </ul><br />
                 <?php ?>
             </li>
        </ul> 
        <?php
                $i
++;
            }
            echo 
'</div>';
        
?>

          <script>
          $('.category').find('li:gt(4)').addClass('toggletr').hide()
          .end().append(
            $('<ul><li class="show_more_btn"><a></a></li></ul>').click(function(){
                $(this).siblings('.toggletr').toggle();
                if($(this).hasClass('expanded')){
                    $(this).text();
                    $(this).removeClass('expanded');
                } else{
                    $(this).text();
                    $(this).addClass('expanded');
                }
           })
          );
          </script>
        <?php if(!osc_is_home_page()){ echo '</div>'; } ?>
        <?php
        
}
    }


remove  or uncomment this line to make the sub categories hide
Code: [Select]
                 <?php /**/if ( osc_count_subcategories() > ) { ?>
                   <ul class="category">
                         <?php while ( osc_has_subcategories() ) { ?>
                             <li>
                             <?php if( osc_category_total_items() > ) { ?><a class="category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>"><?php echo osc_category_name() ; ?></a>
                             <?php } else { ?><span><?php echo osc_category_name() ; ?></span></li>
                             <?php ?>
                         <?php ?>
                   </ul><br />
                 <?php ?>

Remeber to add icon and give name like your categories name like this line
Code: [Select]
<a class="category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>">
                <img src="<?php echo osc_current_web_theme_url('icons/maincategoryicons/') . osc_category_name() .'.png' ?>"  alt="" title=""/></a>

diveshlalit

  • Guest
Re: category on bender theme
« Reply #8 on: September 07, 2013, 04:04:49 pm »
thanks for the reply but i got error

dispenda.com

  • Newbie
  • *
  • Posts: 8
Re: category on bender theme
« Reply #9 on: September 07, 2013, 06:56:29 pm »
thanks for the reply but i got error

what kind of error?

diveshlalit

  • Guest
Re: category on bender theme
« Reply #10 on: September 07, 2013, 10:43:18 pm »
home/public_html/classifieds/oc-content/themes/ender/function.php on line 43 ;D

diveshlalit

  • Guest
Re: category on bender theme
« Reply #11 on: September 13, 2013, 02:01:13 pm »
help pls

s51

  • Sr. Member
  • ****
  • Posts: 309
Re: category on bender theme
« Reply #12 on: September 13, 2013, 05:16:34 pm »
.
Hi Diveshalit ...

>>help pls
Here you go on ver.3.2.1 and new Bender
click...
http://forums.osclass.org/themes/category-icons-for-bender-theme/msg65406/#msg65406

Regards.:/ s51
.
 
 

diveshlalit

  • Guest
Re: category on bender theme
« Reply #13 on: September 15, 2013, 12:20:21 am »
yes i have this picture but need javascript in categories

Gilden

  • Sr. Member
  • ****
  • Posts: 464
  • Availability: 30%
Re: category on bender theme
« Reply #14 on: September 15, 2013, 01:37:10 am »
Javascript to do what?