Advertisements إعلانات

If you maintain more than one blog or a forum, then you can display the RSS feed of your posts or articles from another website on your WordPress blog. اذا كنت الحفاظ على واحد أو أكثر بلوق أو منتدى ، ومن ثم يمكنك عرض آر إس إس لديك وظيفة أو مواد من موقع آخر على وورد بلوق. This would in turn give more exposure to your posts written else where. هذا سيؤدي بدوره الى اعطاء مزيد من التعرض لمواضيعك مكتوبة في مكان آخر. Although there might be plugins to do this job, you can do this using just 2 lines of code. على الرغم من أنه قد تكون هناك ملحقات للقيام بهذا العمل ، يمكنك القيام بذلك فقط باستخدام 2 الأسطر من التعليمات البرمجية. WordPress has a build in function to get the RSS feed of any website. وورد في بناء لديه للحصول على وظيفة في آر إس إس في أي موقع.

We used this query to get the RSS feed of our كنا نستخدم هذا الاستعلام للحصول على آر إس إس لدينا Mobile Blog مدونة المحمول in the sidebar. في الشريط الجانبي. Here is the code. هنا هو رمز.

<?php include_once(ABSPATH . WPINC . '/rss.php'); <؟ [فب] include_once (ABSPATH. WPINC. '/ rss.php') ؛
wp_rss('http://feeds2.feedburner.com/themobileblogin, 5); ?> wp_rss ( 'http://feeds2.feedburner.com/themobileblogin ، 5) ؛؟>

The first line of code is to call to RSS core file of WordPress and in the second line we specify the feed URL and the number of posts to be displayed using the wp_rss() function. في السطر الأول من رمز هو الدعوة إلى آر إس إس الأساسية للملف وورد في السطر الثاني أننا تحديد رابط تغذية وعدد الوظائف التي سيتم عرضها باستخدام wp_rss () وظيفة. You need to replace the feed URL with the URL you want to display in the sidebar. تحتاج إلى استبدال العنوان مع عنوان تغذية تريد عرضها في الشريط الجانبي. You can see the Mobile Blog posts showing up in the sidebar of this blog using this method. يمكنك أن ترى مدونة موبايل الوظائف تظهر في الشريط الجانبي من هذا بلوق باستخدام هذا الأسلوب.

Feed from another blog

You can also do some formatting using the <ul> and <li> based on your current theme style. يمكنك أيضا القيام ببعض التنسيق باستخدام <ul><li>واستنادا إلى النمط الحالي موضوع.

NB: If you are not comfortable adding the code, you might get some plugins to do the job, but it is always advisable to go with lesser number of plugins. ملاحظة : إذا لم تكن مريحة إضافة رمز ، قد تحصل بعض الإضافات للقيام بهذه المهمة ، ولكن من المستحسن دائما أن يذهب مع أقل عدد من الإضافات.

Thanks to بفضل WP Recipes الفسفور الابيض وصفات for this tip. لهذه النصيحة.


5 Responses to “How to Display Any RSS Feed on Wordpress Blog” 5 ردود على "كيفية عرض أي آر إس إس على مدونة وورد"

  1. Also, if your theme supports widgets then you can directly add RSS widget to your blog sidebar أيضا ، إذا كان لديك موضوع تؤيد الحاجيات ثم يمكنك مباشرة إضافة آر القطعة إلى الشريط الجانبي الخاص بك بلوق

  2. Blogsdna Blogsdna says: وتقول :

    Yes, Widget supported themes can directly add RSS Widget which intern usages above code and rss.php to retrieve feeds نعم ، يمكن أن القطعة أيد المواضيع مباشرة إضافة آر القطعة التي الأعراف المتدرب أعلاه رمز وrss.php لاسترداد يغذي

  3. [...] How to Display Any RSS Feed on Wordpress Blog [...] [...]كيفية عرض أي آر إس إس على مدونة وورد [...]

  4. Small error in the code. خطأ صغير في رمز. Second line must be.. السطر الثاني يجب أن يكون..
    wp_rss('http://feeds2.feedburner.com/themobileblogin', 5); ?> wp_rss ( 'http://feeds2.feedburner.com/themobileblogin' ، 5) ؛؟>

    The ending ' is missing. وتنتهي 'مفقود.

  5. Rob says: سرقة وتقول :

    What if you don't want the RSS to go to a sidebar, but the actual main body of your website? ماذا لو كنت لا تريد آر إس إس الذهاب إلى الشريط الجانبي ، ولكن الجسم الفعلية الرئيسية لموقع الويب الخاص بك؟ I belong to an organisation that is globla and I'd like its news to appear in th emain body of my spin-off site, not just in a sidebar? انني انتمي الى منظمة هو globla وأود اخبارها لتظهر في الجسم عشر emain بلدي العرضية الموقع ، وليس فقط في الشريط الجانبي؟

Leave a Reply ترك الرد