/ Published in: PHP
                    
                                        
Completely changed original function, which stopped working around WP2.8.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
<?php
// just before loop in category theme file:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$current_cat = get_query_var('cat');
'paged' => $paged
);
query_posts($args);
// after loop in category theme file
$cat = get_query_var('category__in');
set_query_var("cat",$cat[0]);
// or in Thesis custom_functions.php
function remove_child_cats() {
if (is_category()) :
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$current_cat = get_query_var('cat');
'paged' => $paged
);
query_posts($args);
remove_action('thesis_hook_archive_info', 'thesis_default_archive_info');
echo ' <div id="archive_info">' . "\n";
?>
<p><?php _e('From the category archives:', 'thesis'); ?></p>
<h1><?php echo get_cat_name($current_cat); ?></h1>
<?php
echo ' </div>' . "\n";
endif;
}
add_action('thesis_hook_before_content','remove_child_cats');
function reset_cat() {
$cat = get_query_var('category__in');
set_query_var("cat",$cat[0]);
}
add_action('thesis_hook_after_content','reset_cat');
Comments
 Subscribe to comments
                    Subscribe to comments
                
                