Sgwgo 316 ارسال شده در شهریور 91 گزارش بازنشر ارسال شده در شهریور 91 سلام دوستانمن یه تکه کد از صفحه singel.php کپی کردم همون کادری که مربوط به نمایش اطلاعات نویسندسکه کدش اینه!<div class="author_box"><?php echo get_avatar( get_the_author_meta( 'user_email' ), '67' ); ?> <div class="author_details"> <h5 class="author_name"><?php the_author_posts_link(); ?></h5> <h5 class="author_title"> <?php if(function_exists(icl_register_string)) { icl_register_string('author', 'title', the_author_meta('title')); echo icl_t('author', 'title', the_author_meta('title')); } else { echo get_the_author_meta('title'); } ?> </h5> <p> <?php if(function_exists(icl_register_string)) { icl_register_string('author', 'description', the_author_meta('description')); echo icl_t('author', 'description', the_author_meta('description')); } else { echo the_author_meta('description'); } ?> </p> </div> <!--Author Details--> <div class="author_info"> <span class="num_of_entry"><?php _e('Number of Entries', 'theme'); ?> : <?phpglobal $post;$author_id=$post->post_author; $post_author = $author_id; //author id $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = $post_author AND post_type IN ('post') and post_status = 'publish'" ); echo $count;?></span> <div class="author_connect"> <?php if ( get_the_author_meta('linkedin')) { ?> <a href="<?php echo get_the_author_meta('linkedin'); ?>"><img src="<?php echo MOM_IMG; ?>/icons/linkedin.png" alt=""></a> <?php } ?> <?php if ( get_the_author_meta('facebook')) { ?> <a href="<?php echo get_the_author_meta('facebook'); ?>"><img src="<?php echo MOM_IMG; ?>/icons/facebook.png" alt=""></a> <?php } ?> <?php if ( get_the_author_meta('twitter')) { ?> <a href="http://twitter.com/<?php echo get_the_author_meta('twitter'); ?>"><img src="<?php echo MOM_IMG; ?>/icons/twitter.png" alt=""></a><?php } ?><?php if ( get_the_author_meta('gplus')) { ?> <a href="<?php echo get_the_author_meta('gplus'); ?>"><img src="<?php echo MOM_IMG; ?>/icons/gplus.png" alt=""></a><?php } ?> </div> </div> <!--Author Info--> </div> <!--Author Box-->حالا میخوام این کدها در صفحه ی author.php هم به نمایش دربیادخب طبیعتا برخی متغییر ها که تو کد هستند توی صفحه author.php غریبه هستندمتغییر هایی که باید تغییر کننددر تصاویز زیر واضح12 نقل قول لینک به ارسال
Sgwgo 316 ارسال شده در شهریور 91 مالک گزارش بازنشر ارسال شده در شهریور 91 <?php get_header(); ?><div class="inner"> <div class="container"> <div class="main"><?php the_breadcrumb(); ?><?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?><?php cat_article(); ?><?php endwhile; ?><?php else: ?><!-- Else in here --><?php endif; ?><?php mom_pagination(); ?><?php wp_reset_query(); ?> </div> <!--End Main--> <?php get_sidebar(); ?> </div> <!--End Container--><?php get_footer(); ?> نقل قول لینک به ارسال
rezaonline 2655 ارسال شده در شهریور 91 گزارش بازنشر ارسال شده در شهریور 91 <?php get_header(); ?><div class="inner"> <div class="container"> <div class="main"><?php the_breadcrumb(); ?><?php$counter = 0;if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php $counter++; if($counter ==1): ?> <div class="author_box"><?php echo get_avatar( get_the_author_meta( 'user_email' ), '67' ); ?> <div class="author_details"> <h5 class="author_name"><?php the_author_posts_link(); ?></h5> <h5 class="author_title"> <?php if(function_exists(icl_register_string)) { icl_register_string('author', 'title', the_author_meta('title')); echo icl_t('author', 'title', the_author_meta('title')); } else { echo get_the_author_meta('title'); } ?> </h5> <p> <?php if(function_exists(icl_register_string)) { icl_register_string('author', 'description', the_author_meta('description')); echo icl_t('author', 'description', the_author_meta('description')); } else { echo the_author_meta('description'); } ?> </p> </div> <!--Author Details--> <div class="author_info"> <span class="num_of_entry"><?php _e('Number of Entries', 'theme'); ?> : <?phpglobal $post;$author_id=$post->post_author; $post_author = $author_id; //author id $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = $post_author AND post_type IN ('post') and post_status = 'publish'" ); echo $count;?></span> <div class="author_connect"> <?php if ( get_the_author_meta('linkedin')) { ?> <a href="<?php echo get_the_author_meta('linkedin'); ?>"><img src="<?php echo MOM_IMG; ?>/icons/linkedin.png" alt=""></a> <?php } ?> <?php if ( get_the_author_meta('facebook')) { ?> <a href="<?php echo get_the_author_meta('facebook'); ?>"><img src="<?php echo MOM_IMG; ?>/icons/facebook.png" alt=""></a> <?php } ?> <?php if ( get_the_author_meta('twitter')) { ?> <a href="http://twitter.com/<?php echo get_the_author_meta('twitter'); ?>"><img src="<?php echo MOM_IMG; ?>/icons/twitter.png" alt=""></a><?php } ?><?php if ( get_the_author_meta('gplus')) { ?> <a href="<?php echo get_the_author_meta('gplus'); ?>"><img src="<?php echo MOM_IMG; ?>/icons/gplus.png" alt=""></a><?php } ?> </div> </div> <!--Author Info--> </div> <!--Author Box--> <?php endif;?><?php cat_article(); ?><?php endwhile; ?><?php else: ?><!-- Else in here --><?php endif; ?><?php mom_pagination(); ?><?php wp_reset_query(); ?> </div> <!--End Main--> <?php get_sidebar(); ?> </div> <!--End Container--><?php get_footer(); ?> 3 نقل قول لینک به ارسال
Sgwgo 316 ارسال شده در شهریور 91 مالک گزارش بازنشر ارسال شده در شهریور 91 خیلی حال دادی مرسی نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .