شرح اليوم سيكون عن شرح طريقة تحويل وجعل جميع الروابط الخارجية في مدونة بلوجر من دوفولو «Nofollow» إلى نوفولو «Dofollow» بواسطة رمز أو كود بسيط جدًا نضيفة داخل القالب.
تركيب كود اضافة وسم Nofollow الى الروابط الخارجية في بلوجر بشكل تلقائي
ادخول إلى لوحة تحكم مدونتك، ثم بعد ذلك اختر المظهر، ثم بعد ذلك افتح تحرير HTML، ثم بعد ذلك ابحث عن...
</head>
أو
<!--</head>--></head>
بعد الوصول إلص الرمز التالي:
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' type='text/javascript'/>
<script type='text/javascript'>
var a = $(this);
var href = a.attr('href');
$(document).ready(function() {
$("a[href^='http://']").each(function () {
if(this.href.indexOf(location.hostname) == -1) {
$(this).attr('target', '_blank');
$(this).attr('title', 'Click to open in a new window');
$(this).attr('rel', 'nofollow');
}
}
);
$("a[href^='https://']").each(function () {
if(this.href.indexOf(location.hostname) == -1) {
$(this).attr('target', '_blank');
$(this).attr('title', 'Click to open in a new window');
$(this).attr('rel', 'nofollow');
}
}
);
});
</script>
او استخدم الرمز التالي...
<!--Remove this if you are already using any jQuery.js file-->
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js' type='text/javascript'></script>
<!--End-->
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery('a[href*="https://"]:not([href*="رابط موقعك"])').attr('rel', 'nofollow');
jQuery('a[href*="https://"]:not([href*="رابط موقعك"])').attr("target", "_blank");
});
</script>
شاهد شرح استخدام تحويل الروابط الخارجية الـ Dofollow إلى روابط Nofollow تلقائيا
شكرًا لك وأرجو ان يكون موضوع جعل جميع الروابط الخارجية فى مدونة بلوجر Nofollow تلقائيا قد نال إعجابك.
المصدر: