أقسام الوصول السريع ( مربع البحث )

كود لجعل الروابط الخارجيه Nofollow فى مدونات بلوجر تلقائيا

شرح اليوم سيكون عن شرح طريقة تحويل وجعل جميع الروابط الخارجية في مدونة بلوجر من دوفولو «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(&#39;href&#39;);
$(document).ready(function() {
$("a[href^=&#39;http://&#39;]").each(function () {
if(this.href.indexOf(location.hostname) == -1) {
$(this).attr(&#39;target&#39;, &#39;_blank&#39;);
$(this).attr(&#39;title&#39;, &#39;Click to open in a new window&#39;);
$(this).attr(&#39;rel&#39;, &#39;nofollow&#39;);
}
}
);
$("a[href^=&#39;https://&#39;]").each(function () {
if(this.href.indexOf(location.hostname) == -1) {
$(this).attr(&#39;target&#39;, &#39;_blank&#39;);
$(this).attr(&#39;title&#39;, &#39;Click to open in a new window&#39;);
$(this).attr(&#39;rel&#39;, &#39;nofollow&#39;);
}
}
);
});
</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 تلقائيا قد نال إعجابك.




المصدر:
تعليقات



حجم الخط
+
16
-
تباعد السطور
+
2
-