التصنيف: دعم عام
التصنيف: دعم عام
  • إضافة schema سكيما للصورة البارزة itemprop
  • الالوان في ستايل اضافة News-Ticker-Benaceur لا تعمل
  • اريد كود جعل الصور متساوية في الرئيسية

إضافة schema سكيما للصورة البارزة itemprop

مرحبا أخي ، لقد قمت بتثبيت كود ولاكن أواجه مشكلةإنه يعمل بشكل جيد هناht...
mansor2020 |24 ديسمبر 2020 |5

الالوان في ستايل اضافة News-Ticker-Benaceur لا تعمل

مرحبا الالوان في ستايل اضافة News-Ticker-Benaceur لا تعمل و شريط الاخبار معدل ع...
soufien |4 ديسمبر 2020 |3

اريد كود جعل الصور متساوية في الرئيسية

السلام عليكملديا مشكلة في موقعي الشريط الجانبي يعمل داخل المقالات جيداو...
mansor2020 |8 نوفمبر 2020 |8

  • Add the date,author,comment count to news ticker benaceur plugin

2020/10/27
كاتب الموضوع: BENACEUR
التصنيف: my plugins, ووردبريس wordpress

https://wordpress.org/plugins/news-ticker-benaceur/
ضع الكود التالي في ملف functions.php الخاص بقالبك المفعّل:
put this code in functions.php file of your active theme:

function ben_ntb_funct_filter_title( $string, $ntb ) {
# 'd M Y H-i'| d/m/Y H-i
$d = '<div class="ben_ntb_funct_filter_title"><div class="ben_ntb_funct_filter_title-str s1">';
$d .= date_i18n( 'd/m/Y', strtotime( $ntb[0] ) );
$d .= '</div>';

return $d.'<div class="ben_ntb_funct_filter_title-str">'.$string.'</div></div>';
}
add_filter( 'ntb_title_filter_ben', 'ben_ntb_funct_filter_title', 10, 3 );

function ben_ntb_funct_filter_title_style() {
echo '<style>
.ben_ntb_funct_filter_title-str.s1 {color:red;font-weight: bold;font-size: 12px;padding:0 3px;}
.ben_ntb_funct_filter_title .ben_ntb_funct_filter_title-str {display:inline-block;}
</style>';
}
add_action( 'wp_head', 'ben_ntb_funct_filter_title_style' );

ولإظهار كاتب الموضوع غيّر هذا السطر:
To display the author change this line:

$d .= date_i18n( 'd/m/Y', strtotime( $ntb[0] ) );

إلى:
to:

$d .= $ntb[1];

ولإظهار تاريخ آخر تعديل للموضوع عدل السطر إلى:
and to display the post modification date change to:

$d .= date_i18n( 'd/m/Y', strtotime( $ntb[2] ) );

ولإظهار عدد تعليقات الموضوع عدّل السطر إلى:
and to display comment count change to:

$d .= $ntb[3];


ولتغيير شكل التاريخ في الووردبريس تابع الموضوع التالي:
To change the format of the date see this post:
https://wordpress.org/support/article/formatting-date-and-time/


أما هذا فبدون ستايل:
and this without style:

function ben_ntb_funct_filter_title( $string, $ntb ) {
$d = date_i18n( 'd/m/Y', strtotime( $ntb[0] ) );

return $d.': '.$string;
}
add_filter( 'ntb_title_filter_ben', 'ben_ntb_funct_filter_title', 10, 3 );

أو
or:

return '[ '.$d.' ] '.$string;

أو عدد التعليقات:
or number of comments:

function ben_ntb_funct_filter_title( $string, $ntb ) {
$d = $ntb[3];
return '[ comment(s): '.$d.' ] '.$string;
}
add_filter( 'ntb_title_filter_ben', 'ben_ntb_funct_filter_title', 10, 3 );

الكاتب:
author:

function ben_ntb_funct_filter_title( $string, $ntb ) {
$d = $ntb[1];

return '[ author: '.$d.' ] '.$string;
}
add_filter( 'ntb_title_filter_ben', 'ben_ntb_funct_filter_title', 10, 3 );

تاريخ آخر تعديل للموضوع:
Date of the last modification of the post:

function ben_ntb_funct_filter_title( $string, $ntb ) {
$d = date_i18n( 'd/m/Y', strtotime( $ntb[2] ) );

return '[ modified: '.$d.' ] '.$string;
}
add_filter( 'ntb_title_filter_ben', 'ben_ntb_funct_filter_title', 10, 3 );

 


شارك هذا الموضوع على:

رابط الموضوع للنسخ

نبذة قصيرة عن BENACEUR

أقوم بتطوير الووردبريس وكل ما يتعلق به كالإضافات حيث ساهمت بثلاث إضافات من تطويري, ولذلك فموقعي هذا جعلته يهتم بالدرجة الأولى بتطوير ودعم الووردبريس, ثم الأنترنت والمواقع الإلكترونية بصفة عامة ...




أضف تعليقك | سجّل دخولك

تعليقاتك تحتاج في هذا الموضوع إلى المراجعة قبل النشر