aghahamidgol
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Fixing WordPress
In reply to: how to switch to diffrent classesright , my main category is portfolio with id 4 and i need to make query just for this category, and those number are id of sub-category.
shall i change the number of sub-category to name or something else :(?
now class change to “portfolio” the main cat it means it works but how to manage them using with sub-cat?Forum: Fixing WordPress
In reply to: how to switch to diffrent classesin output class is empty 🙁 it doesn’t work 🙁
<?php if(is_category('5')) { $class='web'; } if(is_category('7')) { $class='video'; } if(is_category('8')) { $class='graphic'; } if(is_category('6')) { $class='photo'; } if(is_category('9')) { $class='commerce'; } if(is_category('10')) { $class='coding'; } ?> <li data-id="id-1" class="<?php echo $class; ?>">this is all the code for loop
<!-- Begin loop porfolio --> <?php query_posts('cat=4'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php if(is_category('5')) { $class='web'; } if(is_category('7')) { $class='video'; } if(is_category('8')) { $class='graphic'; } if(is_category('6')) { $class='photo'; } if(is_category('9')) { $class='commerce'; } if(is_category('10')) { $class='coding'; } ?> <li data-id="id-1" class="<?php echo $class; ?>"> <span class="boxgrid caption"> <!-- Begin Full Size Link and Description --> <a href="<?php bloginfo('stylesheet_directory') ?>/style/images/1.jpg" class="colorbox" title="<?php the_title(); ?>"> <img src="<?php bloginfo('stylesheet_directory') ?>/style/images/th1.jpg"/><!-- Image Thumnail --> </a> <!-- End Full Size Link and Description --> <!-- Begin Caption --> <span class="cover boxcaption"> <strong><?php the_title(); ?></strong> <em><a href="<?php the_permalink(); ?>">Click here to visit the details.</a></em> </span><!-- End Caption --> </span> </li> <?php endwhile; else: ?> <p>error</p> <?php endif; ?> <!-- End loop porfolio -->Forum: Fixing WordPress
In reply to: how to switch to diffrent classestnx a lot i am trying now
Forum: Fixing WordPress
In reply to: how to switch to diffrent classesthank you keesiemeijer, but i have 5 class i have to write else if for them or switch case?
how to manage them? i have 5 different category for postForum: Installing WordPress
In reply to: Problem in first step ( about install)i used my defualt application on my server and then i upgrade wordpress to 2.7 … and is workin fine !
tnx a lot samboll and figaro …
Viewing 5 replies - 1 through 5 (of 5 total)