Меняем Gravatar на постоянную иконку в объявлениях Classipress
Предлагаем вам следующие коды, изменяющие Gravatar на одинаковый логотип для всех пользователей.
Аватарка размером 16 x 16px с прозрачным фоном, например такая:
В файле includes/actions.php
заменяем код:
1 2 3 4 5 6 7 8 9 10 |
function cp_ad_loop_meta() { global $post, $cp_options; if ( is_singular( APP_POST_TYPE ) ) return; ?> <p class="post-meta"> <span class="folder"><?php if ( $post->post_type == 'post' ) the_category(', '); else echo get_the_term_list( $post->ID, APP_TAX_CAT, '', ', ', '' ); ?></span> | <span class="owner"><?php if ( $cp_options->ad_gravatar_thumb ) appthemes_get_profile_pic( get_the_author_meta('ID'), get_the_author_meta('user_email'), 16 ) ?><?php the_author_posts_link(); ?></span> | <span class="clock"><span><?php echo appthemes_date_posted($post->post_date); ?></span></span> </p> <?php } |
На следующий код:
1 2 3 4 5 6 7 8 9 10 |
function cp_ad_loop_meta() { global $post, $cp_options; if ( is_singular( APP_POST_TYPE ) ) return; ?> <p class="post-meta"> <span class="folder"><?php if ( $post->post_type == 'post' ) the_category(', '); else echo get_the_term_list( $post->ID, APP_TAX_CAT, '', ', ', '' ); ?></span> | <span class="owner"><img src="<?php bloginfo('template_url'); ?>/images/cp_gravatar.png" alt="" class="avatar" width="16" height="16" /><?php the_author_posts_link(); ?></span> | <span class="clock"><span><?php echo appthemes_date_posted($post->post_date); ?></span></span> </p> <?php } |
