How To: Solve duplicate content in WordPress without plugins كيف : حل المكررة في المحتوى وورد من دون الإضافات

ADVERTISEMENT إعلانات
To get our software and web/tips via email, sign up for للحصول على برنامجنا والإنترنت / نصائح عبر البريد الإلكتروني ، والاشتراك في daily email newsletter بريد إلكتروني النشرة الإخبارية اليومية . .
Subscribe to RSS feed اشترك في تغذية RSS or أو follow me بي on Twitter? على التغريد؟

Duplicate content is a serious issue for all WordPress blogs, and most bloggers now employ different methods to show partial content. ازدواجية المحتوى مسألة خطيرة للجميع بلوق وورد ، ومعظم المدونين الآن تستخدم وسائل مختلفة لإظهار المحتوى الجزئي. The only blogs with good search rankings which employ full posts, are usually authority blogs, which are labelled as safe and authoritative by Google's algorithm. بلوق الوحيدة الجيدة التي تستخدم للبحث ترتيب كامل الوظائف ، وعادة ما تكون سلطة بلوق ، والتي وصفها بأنها آمنة وموثوق بها من قبل غوغل الخوارزمية.

Plugins are a popular method to reduce duplicate content. الإضافات الشعبية هي وسيلة للحد من ازدواجية المحتوى. However, plugins are not ومع ذلك ، لا الإضافات fully optimized الأمثل , and consumes more server resources than the simple <?php the_excerpt() ?> tag. وتستهلك أكثر من موارد الخادم البسيط <?php the_excerpt() ?> الوسم. Moreover, excerpt tag can use the customized post summary that you may have written. وعلاوة على ذلك ، مقتطفات الوسم مخصصة لاستخدام وظيفة ملخص لديك مكتوب.

In this short tutorial, you should have all the template files in one place. في هذه الدورة التعليمية القصيرة ، يجب أن يكون نموذجا لجميع الملفات في مكان واحد. Once you have those files(probably downloaded from your server, or a local copy that you keep), follow these easy steps: وبمجرد الانتهاء من هذه الملفات (ربما تنزيلها من الخادم الخاص بك ، أو محلية نسخة منك ان تبقي ، واتباع هذه الخطوات السهلة :

ADVERTISEMENT إعلانات

  • Open up index.php , archive.php and search.php فتح index.php ، archive.php search.php
  • In each of these files, search and find the code bit that contains <php the_content في كل من هذه الملفات ، والبحث والعثور على الشفرة التي تحتوي على بت <php the_content
  • Replace the entire tag – usually <?php the_content(__('Read the rest of this entry'));?> (may change depending on theme, but will be similar), with this tag: يستعاض عن كامل الوسم -- عادة <؟ php the_content (__('اقرأ بقية هذا الدخول '))؛؟>(قد يتغير تبعا للموضوع ، ولكن تكون مماثلة) ، وهذا الوسم :
    <?php the_excerpt();?> <؟ php the_excerpt ()؛؟>
    Save the files. حفظ الملفات.
  • Open up index.php again, and save it as category.php (do not discard index.php ). فتح index.php من جديد ، واحفظه كما category.php (لا تجاهل index.php

In the above steps, we have replaced the content tag with the excerpt tag so that only a short paragraph of the post is shown on pages other than the post page. في الخطوات المذكورة أعلاه ، استبدلنا مضمون الوسم مع الوسم حتى مقتطفات قصيرة فقط من الفقرة بعد يظهر في الصفحات بخلاف ما بعد الصفحة. Most themes lack a category.php , and its absence can allow full posts on category pages. وتفتقر معظم المواضيع category.php ، وعدم وجوده يمكن أن تسمح الكاملة على وظائف الفئة صفحة. By duplicating the index.php file(which has excerpt tag), that problem is also solved. من خلال تكرار index.php الصورة (التي مقتطفات الوسم) ، على أن تحل هذه المشكلة أيضا.

Open Mic هيئة التصنيع العسكري مفتوحة

How do you prevent duplicate content? كيف يمكن منع ازدواجية المحتوى؟ Do you use this method, or any plugins? هل تستخدم هذه الطريقة ، أو أي ملحقات؟ If so, why do you prefer it over the excerpt tag?(I'd like to hear, as I am myself confused at which method to choose). إذا كان الأمر كذلك ، لماذا كنت تفضل ذلك خلال مقتطفات الوسم؟ (أريد أن يسمع ، وأنا نفسي فيه الخلط بين طريقة اختيار). Do tell me your views through comments. هل ليقول لي من خلال وجهات نظركم.

Comments تعليقات
  1. This is exactly what I have been doing. هذا هو بالضبط ما كنت افعل. Use post excerpts. مقتطفات استخدام الوظيفة.

    Nirmal Nirmal
  2. @Nirmal: Glad to hear your opinion. @ Nirmal : سعيد لسماع رأيكم. Could you be more specific as to why you prefer it? هل يمكن أن يكون أكثر تحديدا لماذا كنت تفضل؟

    Sumesh Sumesh
  3. Funny to run into this, I'd just blogged about something similar yesterday! مضحك لتصل الى هذا ، I'd blogged فقط عن شيء مماثل امس! And you did this 2 days earlier – guess it was a repeat for you to read my feed then! وفعلت ذلك قبل أيام 2 -- تخمين كان تكرار لكم قراءة رسالتي ثم تغذية!
    [Goes over to subscribe to your feed] [أكثر من يذهب للاكتتاب خلاصتك]

    But I'd just like to make one clarification though – you won't need category.php if you have archive.php or index.php (err, you'd certainly have this one!). بل انني اريد تقديم واحد على الرغم من التوضيح -- فلن تحتاج category.php إذا كان لديك أو archive.php index.php (يخطئ ، كنت بالتأكيد هذه واحدة!). What I meant was – if you are going to show excerpts on index.php, you can avoid having archive.php and category.php altogether – don't ask me why not, saves you 4kb on your webspace ما قصدته هو -- إذا كنت ستقوم بعرض مقتطفات على index.php ، يمكنك تجنب archive.php وcategory.php تماما -- لا تسألني لماذا لا يوفر لك 4KB على webspace ؛)

    The order is: الأمر :
    1. 1. category-xx.php الفئة xx.php
    2. 2. category.php category.php
    3. 3. archive.php archive.php
    4. 4. index.php index.php

    If you'd like to make one particular category look unique, you can create a file with the category-CATEGORYNUMBER.php and that particular category would follow this template. إذا كنت ترغب في جعل فئة واحدة بعينها نظرة فريدة ، يمكنك إنشاء ملف CATEGORYNUMBER.php بين فئة وفئة معينة من شأنها أن تتبع هذا النموذج. If it doesn't find this file, it will check if the next file in the hierarchy is there and so on. إذا لم تجد هذا الملف ، سوف تعرف ما اذا كان الملف التالي في التسلسل الهرمي هو هناك ، وما إلى ذلك.

    Sorry about the overly long comment, I had to make myself clear! عذرا عن التعليق الطويل ، كان لزاما علي نفسي واضح!

    Karthik Karthik
  4. @Karthik: No problem whatsoever about long comments – I love 'em! @ Karthik : لا توجد مشكلة على الإطلاق طويلة ملاحظات -- أحب 'م!
    Well, that thing about category-xx.php was something new to me, thanks. حسنا ، هذا الشيء الفئة xx.php كان شيئا جديدا بالنسبة لي ، وذلك بفضل. And category no. وفئة لا. means its ID, right? يعني عن الهوية ، أليس كذلك؟
    As for 4kB webspace, lol أما بالنسبة لل4KB webspace ، لول : مد

    Sumesh Sumesh
  5. Yup, sorry, I should have mentioned ID there! نعم ، آسف ، وأرجو أن يكون هناك هوية المذكورة!

    Karthik Karthik
  6. @Karthik: No problem, its understood. @ Karthik : لا توجد مشكلة ، ومفهومة. Now that you've clarified it, readers will also understand. الآن بعد أن كنت قد أوضح ، كما يفهم القراء.

    Sumesh Sumesh
  7. My recommendation would be to do this but also have unique content in the excerpt. ستكون توصيتي للقيام بذلك وإنما أيضا محتوى فريدة في المقتطف.

    I have actually switched categories off entirely and have opted for pages instead. لقد تحولت في الواقع قبالة كلية الفئات واختارت بدلا من الصفحات.

    (Note the blog above is not an example of this ;-D ) (لاحظ بلوق أعلاه ليست مثالا على ذلك ؛ د)

    Fred Schebesta فريد Schebesta
Leave a Reply ترك الرد

If you have a computer/web help question, إذا كان لديك جهاز الكمبيوتر / الإنترنت تساعد هذه المسألة ، click here to ask it on our forum اضغط هنا لنسأل عن محفلنا for faster response. أسرع استجابة.