- تاریخ : 16th آوریل 2020
- موضوع : اسکریپت , اسکریپت جدید , اسکریپت رایگان , اسکریپت فارسی
- بازدید : 219 نمایش
- نظرات : بدون نظر
افزودن فونت فارسی به پنل مدیریت وردپرس
[ad_1]
ما وبمسترها بیش از ۷۰ درصد وقت کاری خود را روی پنل مدیریت وردپرس صرف میکنیم. حالا برای تنوع و تجربه بهتر کاری بهتر نیست با افزودن فونت فارسی به پنل مدیریت وردپرس، فونت فارسی دلخواه خودمان را جایگزین فونت Tahoma کنیم؟
اگر پاسخ شما بله هست حتما این مقاله آموزشی را دنبال کنید. به شما توضیح خواهم داد چطور با افزودن فونت دلخواه خود به پنل مدیریت وردپرس تجربه کاری بهتری داشته باشید. البته قبلا آموزش افزودن CSS به مدیریت وردپرس را منتشر کردیم. اما در این مقاله کمی دقیقتر موضوع را بررسی خواهیم کرد.
افزودن فونت فارسی به پنل مدیریت وردپرس
کد مورد نیاز این آموزش:
add_action('admin_head','mihanwpadminfont');
function mihanwpadminfont(){
echo "
<style>
@font-face {
font-family: iranyekan;
font-style: normal;
font-weight: bold;
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanwebbold.eot');
src: url('http://loclhost/wp/wp-content/themes/fonts/eot/iranyekanwebbold.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/woff/iranyekanwebbold.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/ttf/iranyekanwebbold.ttf') format('truetype');
}
@font-face {
font-family: iranyekan;
font-style: normal;
font-weight: 100;
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanwebthin.eot');
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanwebthin.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/woff/iranyekanwebthin.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/ttf/iranyekanwebthin.ttf') format('truetype');
}
@font-face {
font-family: iranyekan;
font-style: normal;
font-weight: 300;
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanweblight.eot');
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanweblight.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/woff/iranyekanweblight.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/ttf/iranyekanweblight.ttf') format('truetype');
}
@font-face {
font-family: iranyekan;
font-style: normal;
font-weight: normal;
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanwebregular.eot');
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanwebregular.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/woff/iranyekanwebregular.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/ttf/iranyekanwebregular.ttf') format('truetype');
}
@font-face {
font-family: iranyekan;
font-style: normal;
font-weight: 500;
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanwebmedium.eot');
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanwebmedium.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/woff/iranyekanwebmedium.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/ttf/iranyekanwebmedium.ttf') format('truetype');
}
@font-face {
font-family: iranyekan;
font-style: normal;
font-weight: 800;
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanwebextrabold.eot');
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanwebextrabold.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/woff/iranyekanwebextrabold.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/ttf/iranyekanwebextrabold.ttf') format('truetype');
}
@font-face {
font-family: iranyekan;
font-style: normal;
font-weight: 900;
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanwebblack.eot');
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanwebblack.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/woff/iranyekanwebblack.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/ttf/iranyekanwebblack.ttf') format('truetype');
}
@font-face {
font-family: iranyekan;
font-style: normal;
font-weight: 950;
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanwebextrablack.eot');
src: url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/eot/iranyekanwebextrablack.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/woff/iranyekanwebextrablack.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
url('http://localhost/wp/wp-content/themes/mihanmarket/fonts/ttf/iranyekanwebextrablack.ttf') format('truetype');
}
body,a,p,div,input,span,h1,h2,h3,h4,h5,h6,textarea,ul,li,button,.editor-post-title__block .editor-post-title__input,.rtl h1, .rtl h2, .rtl h3, .rtl h4, .rtl h5, .rtl h6{
font-family:iranyekan;
}
</style>
";
}
راستی! برای دریافت مطالب وردپرسی در کانال تلگرام میهن وردپرس عضو شوید.
[ad_2]
لینک منبع مطلب
لینک کوتاه مطلب :
به نکات زیر توجه کنید