Arianp 2 ارسال شده در تیر 27، 1393 گزارش اشتراک گذاری ارسال شده در تیر 27، 1393 لینک ها تنها برای اعضای سایت قابل نمایش است. . یکی دیگر از ویژگی های وردپرس این است که هر نویسنده میتونه بیگرافی خودش رو بیان کنه(منظورم نمایش بیگرافی هر نویسنده هستش) .. آموزش رو سخت نمی کنم .. برای این کار کد زیر رو به functions.php اضافه کنید : <?phpfunctionauthor_excerpt (){ $word_limit= 20; // تعداد کلمه های متن بیوگرافی $more_txt= 'Read more about '; // نوشته ی ادامه مطلب $txt_end= '...'; // Display text end $authorName= get_the_author();$authorUrl= get_author_posts_url( get_the_author_meta('ID'));$authorDescription= explode(" ", get_the_author_meta('description'));$displayAuthorPageLink= count($authorDescription) > $word_limit? $txt_end.'<br /> '.$more_txt.' <a href="https://go.20script.ir/index.php?url='.$authorUrl.'">'.$authorName.'</a>': '';$authorDescriptionShort= array_slice($authorDescription, 0, ($word_limit));return(implode($authorDescriptionShort, ' ')).$displayAuthorPageLink; }?> <?php if(function_exists('author_excerpt')){echoauthor_excerpt();} ?> لینک به دیدگاه به اشتراک گذاری در سایت های دیگر More sharing options...
پست های پیشنهاد شده