لاستعمال الاكواد المختصرة في اظهار اعلانات جوجل GOOGLE ادسنس تابع الطريقة



قم بفتح ملف function.php الموجود مع القالب template المستخدم
اضف الاسطر التالية للملف






رمز Code:
function AdSense_1() { return '<script type=&quot;text/javascript&quot;><!-- google_ad_client = &quot;pub-xxxxxxxxxxxx&quot;; google_ad_slot = &quot;xxxxxxxxxx&quot;; google_ad_width = 468; google_ad_height = 60; //--> </script> <script type=&quot;text/javascript&quot; src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;> </script>'; } add_shortcode('60*234', 'AdSense_1');
مع استبدال هذا الكود code بكود code الاعلان الخاص بك

رمز Code:
<script type=&quot;text/javascript&quot;><!-- google_ad_client = &quot;pub-xxxxxxxxxxxxx&quot;; google_ad_slot = &quot;xxxxxxxxxx&quot;; google_ad_width = 468; google_ad_height = 60; //--> </script> <script type=&quot;text/javascript&quot; src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;> </script>
احفظ ملف الخصائص ثم اضف هذا الكود code للتدوينة في المكان الذي ترغب به وسيظهر اعلان ادسنس مكانه


رمز Code:
[60*234]
بامكانك اضافة اكثر من كود code مختصر واكثر من اعلان لاستدعائها في التدوينات فقط بتعديل اسم الدالة والكود code المختصر لها واعلان ادسنس
لاحظ تركيب install الكود code

رمز Code:
function عنوان الدالة() { return 'ضع هنا كود code اعلان ادسنس الخاص بك'; } add_shortcode('ضع هنا الاختصار المطلوب ', 'عنوان الدالة');
الموضوع كما هو في مدونتي : اضغط هنا





©المشاركات المنشورة تعبر عن وجهة نظر صاحبها فقط، ولا تُعبّر بأي شكل من الأشكال عن وجهة نظر إدارة المنتدى©