This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( 'hide_empty=0' ); | |
$terms = get_terms( 'category', $args ); | |
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) { | |
$count = count( $terms ); | |
$i = 0; | |
$term_list = '<p class="my_term-archive">'; | |
foreach ( $terms as $term ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add Custom Post Type Categories to General Categories Archive | |
function add_custom_types_to_tax( $query ) { | |
if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { | |
// Get all your post types | |
$post_types = get_post_types(); | |
$query->set( 'post_type', $post_types ); | |
return $query; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add a Featured Image Column to WordPress Dashboard | |
add_filter('manage_posts_columns', 'posts_columns', 5); | |
add_action('manage_posts_custom_column', 'posts_custom_columns', 5, 2); | |
function posts_columns($defaults){ | |
$defaults['riv_post_thumbs'] = __('Featured Image'); | |
return $defaults; | |
} | |
function posts_custom_columns($column_name, $id){ | |
if($column_name === 'riv_post_thumbs'){ | |
echo the_post_thumbnail(array(100,100)); |