Unlimited $1.99 domain names - We use goDaddy غير محدود 1،99 دولار أسماء النطاقات -- نحن نستخدم godaddy
Powered by MaxBlogPress تصميم maxblogpress

WordPress المأجور رقم 2 : كيفية انشاء صفحة فهرس ماستر ارشيف | jtpratt للاخطاء المدونات
Jtpratt للاخطاء المدونات


Home المنزل » Wordpress Hack #2: How To Create A Master Archive Index Page »WordPress المأجور رقم 2 : كيفية انشاء صفحة رئيسية أرشيف الرقم القياسي



Posted in: نشر في :

بلوق - اعداد فئة الصورةالفئة صورة WordPress
478 views 478 اراء


Please note: This page was originally written in English. يرجى ملاحظه : هذه الصفحه مكتوب اصلا باللغه الانكليزيه.

The original post can be viewed الاصلي ويمكن النظر الى ما بعد here هنا .

Please note: This page was originally written in English.

The text has been translated using an online service such as Google or Babelfish.

The original post can be viewed here.


In your Wordpress blog do you have a sortable clean and easy way for visitors to access your previous posts? في بلوق WordPress الخاص بك هل لديك قابل للفرز ونظيفة والزوار وسيلة سهلة للوصول الى الوظائف السابقة الخاصة بك؟ Other than the month based archive link in your sidebar, you may not have an archive index at all! غير شهر ارشيف الارتباط القائم في الشريط الجانبي الخاص بك ، قد لا يكون لها أرشيف الرقم القياسي في جميع! It’s time you hacked your own Master Archive Index Page! لقد حان الوقت لكم hacked الخاصة بك الصفحه الرئيسية أرشيف الرقم القياسي!

This is Wordpress Hack #2 in our 30 “Hack-a-Thon”! وهذا هو المأجور WordPress # 2 في 30 "الماجور - أ - thon"! That’s right, I’m going to give you one هذا صحيح ، أنا ذاهب الى ان نعطيكم واحد Wordpress hack per day for 30 days WordPress المأجور في اليوم الواحد لمدة 30 يوما , and at the end of that time you will have pimped out your blog like you never would have believed possible! ، وفي نهاية ذلك الوقت سيكون لكم عمل قوادا الخاص بك بلوق مثلك أبدا أن يعتقد ممكن! Be sure to signup for the RSS feed or subscribe by email at the top of the page. تأكد من الاشتراك في ار اس اس او الاشتراك عن طريق البريد الالكتروني في اعلى الصفحه.

Out of the box the default Archives for Wordpress aren’t very sexy. من خارج الصندوق الافتراضي المحفوظات ليست WordPress مثير جدا. In fact, as I’ve mentioned in previous posts the word thing about Wordpress (to me) is the fact that the content seems hard to navigate, hard to get to, and downright self-defeating at times. وفي الواقع ، وكما ذكرت لقد قمت في الوظائف السابقة عبارة عن شيء WordPress (لي) هو حقيقة ان محتوى ويبدو من الصعب ان تبحر ، من الصعب ان نصل الي ، واكيد بنتائج عكسيه في بعض الاحيان. Let’s take this blog as it stands right now as an example. ويجب ان نتخذ هذا بلوق كما هو عليه الآن كمثال. The homepage has one full post and 9 excerpted posts. الصفحه الرئيسية الكامل بعد واحد و 9 وظائف مقتطف. The sidebar contains links to the last 10 posts, and most viewed posts, in addition to a link to categories and monthly archives. الشريط الجانبي يتضمن وصلات الى آخر 10 وظائف ، وظائف واكثرها مشاهدة ، اضافة الى وصلة الى فئات شهريه والمحفوظات. I can also search, and those are my basic options for finding content. ويمكنني ان ابحث ايضا ، وهذه هى بلادى خيارات اساسية لايجاد المحتوى. The custom pages I’ve setup also lead to some article series and categorized content. العادة صفحات لقد قمت الاعداد يؤدي ايضا الى بعض سلسلة المادة وتصنيفها المحتوى. I currently don’t have an HTML web page site map (just an XML sitemap for search crawlers), so there really is no way to get a birds eye view of all my content. انني في الوقت الحاضر ليست لديها لغة تأشير النص الفائق خريطه الموقع صفحة على الشبكه العالمية (مجرد لغة الترميز القابلة للامتداد خريطه الموقع للبحث الزواحف) ، ولذلك هناك حقيقة لا سبيل للحصول على الطيور العين وبالنظر الى كل محتوى بلدي. I’m rapidly approaching 100 posts, but at any give time you’re lucky to have more than 10-15 options for content as you surf around my blog. انا تقترب بسرعة من 100 وظيفة ، ولكن في اي اعطاء الوقت كنت محظوظا في الحصول على مزيد من الخيارات للمحتوى 10-15 لكم بلوق الامواج حول بلدي.

Your theme may or may not currently display any more than month based archive pages, which will just be links in your sidebar to the months of the year you had posts. الموضوع الخاص بك قد يكون او قد لا تظهر في الوقت الراهن اي اكثر من شهر على أساس ارشيف صفحات ، والتي سوف تكون عادلة وصلات في الشريط الجانبي الخاص بك الى اشهر من السنة كنت قد وظيفة. Some themes also have a calendar. بعض المواضيع ايضا ان يكون لها جدول زمني. All these normally do is use your “archive.php” in your theme directory as a template to bring up a list of posts the same way you index, search, category, or tag pages do - a list of up 10 to posts at a time with ‘previous’ and ‘next’ links at the bottom of the page. كل هذه عادة القيام به هو استخدام مساعيكم "archive.php" الخاص بك في موضوع الدليل كنموذج لطرح قائمة وظائف بنفس الطريقة لكم الرقم القياسي ، بحث ، فئة ، او علامة صفحات تفعل -- قائمة تصل الى 10 وظيفة في مع الوقت 'السابقة' و 'القادمة' وصلات في اسفل الصفحه. In my experience, most themes don’t have a master archive page (or what the في تجربتي ، فان معظم المواضيع التي ليس لديها ارشيف ماستر صفحة (او ما Wordpress Codex calls the “Archive Index” WordPress هيئة الدستور الغذائي تطلق عليه "أرشيف الرقم القياسي" , although some have a “archives.php” file to create one from. ، وإن كان بعضها "archives.php" لانشاء ملف من احد. Notice that this template file has an “s” on archives.php. لاحظ ان هذا الملف قد قالب بحرف "م" على archives.php. Look in your theme directory, and you should have a file named “archives.php”. نظره في موضوع الدليل الخاص بك ، وانت ينبغي ان يكون للملف اسمه "archives.php". If you do add the first 5 lines below at the very top of that file, and the rest of the code in “the loop” of that page (after the header and before the endwhile). واذا اضيف الاولى 5 خطوط ادناه على قمة من هذا الملف ، وبقية من هذا القانون في "الحلقه" من تلك الصفحه (بعد وقبل رأس endwhile). If for some reason your theme doesn’t have an archives.php, just download a copy of your “page.php” file, rename and save it as “archives.php” and then add these code to it (then upload to your theme directory). اذا كان لسبب من الاسباب الخاصة بك الموضوع ليس لديها archives.php ، مجرد تحميل صورة من "page.php" الملف ، وإعادة تسمية أنقاذ بانها "archives.php" ، ثم تضيف هذه المدونه لأنه (ثم رفع الى حسابك موضوع دليل).

 <?php /* Template Name: Master Archives Page */ ?>  <h2>Archives by Month:</h2>   <ul>     <?php wp_get_archives('type=monthly'); ?>   </ul>  <br /> <h2>Archives by Subject:</h2>   <ul>      <?php wp_list_cats(); ?>   </ul> <؟ بي. اتش. بى / * اسم القالب : ماجستير المحفوظات الصفحه * /؟> <h2>المحفوظات من جانب الشهر : </ H2> <ul><؟ بي. اتش. بى wp_get_archives ( 'نوع الشهري =') ؛؟> </ UL> <برازيلي / > <h2>المحفوظات من جانب الموضوع : </ H2> <ul><؟ بي. اتش. بى wp_list_cats () ؛؟> </ UL> 

مثلا قالب الصفحه Make sure you have the “Template Name” in the top. تاكد من "اسم النموذج" في اعلى الصفحه. Now upload this file to your theme directory, and in your Wordpress dashboard go to “Write -> Page”. الآن رفع هذا الملف الى حسابك في موضوع الدليل ، وفي لوحة التحكم الرئيسية الخاصة بك WordPress اذهب الى "الكتابة --> الصفحه". On the right hand side you’ll see “page template” as in the image example here. على يمين سترى في الصفحه "قالب" كما في الصورة مثلا هنا. Just select “Master Archives Page”. فقط اختر "الصفحه الرئيسية المحفوظات". I’m going to call mine “Archived Posts Sitemap”. انا ذاهب الى الدعوة الى ازالة الالغام "الارشيف وظيفة الموقع". I like that title because it says it’s an archive page with a sitemap. أعجبني هذا العنوان لأنه يقول انه مع وجود ارشيف خريطه موقع صفحة. To me a sitemap is a great big categorized page of titles and links where you can get a the big picture of a site pretty quickly. لي عظيم خريطه الموقع هو صفحة المصنفه كبيرة من عناوين وصلات حيث يمكنك الحصول على الصورة الكبيرة للموقع جميلة بسرعة. That’s the impression I want to give people, unlike the monthly archive pages that just list posts and excerpts. هذا هو الانطباع الاول يريد ان يعطى الشعب ، على عكس الشهريه ارشيف صفحات فقط ان قائمة الوظائف ومقتطفات. The first time creating this page I’m not going to give it much content - just some introductory content. اول مرة بانشاء هذه الصفحه انا لن تقدم له الكثير من مضمون -- فقط تمهيديه بعض ما ورد فيها. Save this page and then reload your site in another tab or window. احفظ هذه الصفحه وبعد ذلك إعادة تحميل موقعك في علامة تبويب اخرى او النافذة. You should see the name of this new page in your “Pages” in your sidebar. يجب ان تتمكن من رؤية اسم هذه الصفحه الجديدة الخاصة بك في "صفحات" في الشريط الجانبي الخاص بك. Click on it to bring it up and you should have something like this: انقر على انه لكي يصل لكم وينبغي ان يكون شيئا مثل هذا :

أرشيف الرقم القياسي المثال

You see in that example what you get is a listing of archives by month, and also by subject (category). كنت انظر في هذا المثال هو ما تحصل عليه قائمة المحفوظات حسب الشهر ، وايضا عن طريق هذا الموضوع (الفئة). This really sucks doesn’t it!? هذا حقا مصات لا!؟ I mean come on, everyone already has both of these already in their sidebar - I do! يعني هيأ ، كل فرد في كل من لديه بالفعل من هذه بالفعل في الشريط الجانبي -- أفعل! There are basically two different ways to solve this problem, and actually these solutions can be combined. هناك طريقتين مختلفتين اساسا لحل هذه المشكلة ، وبالفعل يمكن ان تكون هذه الحلول مجتمعة. The first thing we can do is get a Wordpress plugin for archives to get more options on this page. اول شيء نستطيع ان نفعله هو الحصول على المحفوظات ووردبريس البرنامج المساعد للحصول على مزيد من الخيارات في هذه الصفحه. The second is to do a little hackng and add some code to the page to get the information out of the database we need to make sure visitor’s get all the options they need. والثاني هو ان تفعل قليلا hackng واضافة بعض المدونه على الصفحه الحصول على المعلومات من قاعدة بيانات ونحن بحاجة الى التأكد من الزوار للحصول على كل الخيارات التي يحتاجون اليها.

After reviewing my options - these are my thoughts… وبعد استعراض خياراتي -- وهذه هي أفكاري…

I “could” use yesterday’s الاول "يمكن ان" استخدام الأمس query_posts hack query_posts المأجور to list every post I have on the page - but that wouldn’t be very nice visually at all. كل قائمة الى ما بعد الاول على الصفحه -- ولكن ذلك لن يكون لطيف جدا بصريا على الاطلاق. I think it would be great to give visitor’s most “most viewed” or “most popular” posts on this page. واعتقد انه سيكون كبيرا لاعطاء الزوار اكثر "أكثرها مشاهدة" او "الاكثر شعبية" وظيفة في هذه الصفحه. I already have the most viewed top 10 in my sidebar. وقد سبق لي ان اكثر النظر الى بلدي اعلى 10 في الشريط الجانبي. I use the أنا أستخدم Lester Chan Plugin WP-PostViews ليستر - تشان البرنامج المساعد رزمه العمل postviews to get this. للحصول على هذه. It will display the most viewed posts, or most viewed posts for a category. بل سنعرض اكثرها مشاهدة وظيفة ، او ينظر اليها معظم وظائف لهذه الفئة. I’m going to use it to display the top 25 most viewed posts. انا ذاهب الى استخدامها لعرض أعلى 25 اكثرها مشاهدة وظيفة. That’s more than I have in my sidebar and should be very useful to visitor’s. اكثر من ذلك انني في بلدي الشريط الجانبي وينبغي ان تكون مفيدة جدا للالزائر. According to the ووفقا ل WP_PostViews documentation Wp_postviews الوثائق all I need to do is add this code “outside the loop” of my archives.php to add this to my Master Archives Index Page (since I already ahve WP_PostViews installed as a plugin in my Wordpress installation): جميع انا بحاجة الى القيام به هو اضافة هذا الرمز "خارج نطاق الحلقه" من بلادي archives.php لاضافة هذا الى بلدي صفحة فهرس المحفوظات ماجستير) وبما انني سبق لها بوصفها wp_postviews تركيب البرنامج المساعد في بلدي WordPress تركيب) :

 <h2>Top 25 Most Viewed Posts</h2> <?php if (function_exists('get_most_viewed')): ?>    <?php get_most_viewed('both', 25) ?> <?php endif; ?> <br /><br /> <h2>أعلى 25 وظيفة اكثرها مشاهدة </ H2> <؟ اذا بي. اتش. بى (function_exists ( 'get_most_viewed')) :؟> <؟ بي. اتش. بى get_most_viewed ( 'كلا' ، 25)؟> <؟ بي. اتش. بى endif ؛؟> <برازيلي / > <br/> 

Since you have to use that code outside the loop, and I have a page heading just inside the loop on my archives.php, I decided to place this after the loop in my Master Archives Index page. منذ عليك ان استخدام هذا القانون خارج الحلقه ، ولقد صفحة العنوان فقط داخل الحلقه archives.php على بلدي ، فقد قررت ان هذا المكان بعد حلقة رئيسية في بلادي صفحة فهرس المحفوظات. Another way to do this you might care for is by using the وثمة طريقة اخرى لذلك كنت قد والرعايه لهو عن طريق إستخدام using the Top Post plugin باستخدام وظيفة البرنامج المساعد للأعلى by JohnTP to display the top post by category like he does on من جانب johntp لعرض وظيفة أعلى من قبل فئة على غرار ما يفعله his top posts page كبار المسؤولين وظائف الصفحه . I decided to stick with what I have so far. قررت ان العصا مع ما قلته حتى الآن.

Doing a little more research I found two very similar Wordpress Archiving Plugins, القيام قليلا الى المزيد من البحث وجدت اثنين مشابهة جدا للمحفوظات ملحقات WordPress ، SRG Clean Archives غيلدر سورينامي تنظيف المحفوظات , and ، Smart Archives المحفوظات الذكيه . They basically do the same thing, just formatted a little differently. انها اساسا ان تفعل نفس الشيء ، قليلا فقط على شكل مختلف.

Here’sa clean archives example where you’ll see that you get monthly archives with linked titles and post counts. فيما يلى النظيفه المحفوظات مثلا حيث سترى ان تحصل على الشهري المحفوظات ترتبط مع عناوين وعدد الوظائف. It also shows the day posted before and comment count after each linked title. كما يظهر اليوم قبل نشرها والتعليق عليها ان تعول بعد ربط كل عنوان.

مثلا النظيفه المحفوظات

In the Smart Archives plugin example you’ll see an addition of a linked calendar above the posts by year and month. في البرنامج المساعد الذكيه المحفوظات مثلا سترى بالاضافة الى وجود ربط الجدول الزمني اعلاه الوظائف حسب السنة والشهر. The posts are also listed by month. الوظائف المدرجه في قائمة ايضا في الشهر. With this plugin you don’t get date posted or comment count. مع هذا البرنامج المساعد لم تحصل على تاريخ النشر او التعليق العد.

مثلا الذكيه المحفوظات

In the end I wanted to go with something I thought was not only a bit more cool, but much more user-friedly. في النهاية اردت ان اذهب مع ما كنت اعتقد ليست سوى اكثر قليلا باردا ، ولكنها أكثر سهولة وfriedly. I really wanted to use انا حقا تريد إستخدام Exended Live Archive Exended العيش ارشيف because of the interface, but it’s not compatible with Wordpress 2.3+ at all. وبسبب التداخل ، ولكنها ليست متوافقه مع WordPress 2.3 + على الاطلاق.

In the end I went with في النهاية ذهبت KG Archives كغ المحفوظات for my Master Archives Index page because it has a handy drop down at the top where visitor’s can quickly choose to see one month or all months quickly of archived posts. ماجستير في المحفوظات لبلدي صفحة فهرس لأنه مفيد لها اسقاط على رأس الزائر حيث يمكن ان نرى على وجه السرعه في اختيار واحدة كل شهر او اشهر على وجه السرعه من الارشيف وظيفة. In addition this post lists the date posted and comment count for each as well. وبالاضافة الى هذا المنصب في تاريخ نشر القوائم والتعليق عليها ان تعول لكل ايضا.

كغ مثلا المحفوظات

To place the KG Archives content on your Master Archive Index Page you just have to copy and paste the following code - but this time go back and “edit” your actual “page” in “Manage->Pages” where you wrote the intro content, and paste this beneath (in code view): لوضع المحتوي على كيلوغرام المحفوظات الخاصة بك سيد ارشيف صفحة فهرس عليكم سوى نسخ ولصق الشفره التالية -- ولكن هذه المرة من العودة و"تحرير" قلتم "الصفحه" في "ادارة -> صفحات" اين انت كتبت مقدمة المحتوى ، ولصق هذا أسفل (في قانون رأي) :

 <kgarchives initialmonth="current" /> <kgarchivesinitialmonth="current" /> 

I removed the original code I added at the beginning of this hack tutorial to get archives by month or subject in favor of the KG Archives sortable archive code. الاول ازالة الرمز الاصلي واضفت في بداية هذه الدورة التعليميه للحصول على المأجور من قبل شهر أو المحفوظات الموضوع لمصلحة من المحفوظات كغ قابل للفرز ارشيف المدونه. Based on all the options I presented to you in this post - you must decide which of all the layouts and plugins you like best for your archives index page. على اساس كل الخيارات قدمت لكم في هذا المنصب -- انت التي يجب ان تقرر لجميع مخططات وملحقات هل تريد ان افضل مؤشر للمحفوظات الصفحه الخاصة بك. View my new نظرا لعملي الجديد Archived Posts Sitemap page here حفظت الصفحه هنا خريطه الموقع وظيفة !

There are many other options in the readme file if you download this plugin, I chose to only display the current month at first. وهناك العديد من الخيارات الأخرى في الملف التمهيدي في حالة تحميل هذا البرنامج المساعد ، واخترت أن تظهر الا في أول الشهر الحالي. Now I have a Master Archive Index Page where users can navigate all my past posts quickly and easily. الآن عندي ماستر ارشيف صفحة فهرس حيث يمكن للمستخدمين انتقل بلدي الماضي جميع الوظائف بسرعة وسهولة. They can even see all posts on one page if they choose. حتى انها يمكن ان ترى كل وظيفة على صفحة واحدة اذا اختاروا ذلك. I’ve also listed my most popular posts. لقد قمت ايضا قائمة بلدي الاكثر شعبية وظيفة. If I keep adding pages, I may also expand my Archive Index to include a listing of all my parent and child pages at the very bottom. اذا كنت ابقاء اضافة صفحات ، ويمكن ايضا توسيع نطاق بلدي أرشيف الرقم القياسي لتشمل قائمة بجميع بلدي الام والطفل في صفحات جدا من القاعده الى القمة. Create your own archive index now! قم بإنشاء أرشيف الرقم القياسي الآن! I gave you plenty of options, and as always if you have something to add or a question - please comment now! انا اعطي لكم الكثير من الخيارات ، كما هو الحال دائما ، واذا كان لديك شيء لاضافة او سؤال -- يرجى التعليق الآن!


Tags: العلامات : , ، , ، , ،

Question or Comment?? السؤال او التعليق؟؟ Spill it Now... انسكاب الآن...

القفز للفرح أكثر من التعليقات!

We Reward Comments! ونحن مكافاه تعليقات!


We dofollow links, and get your latest blog post as a byline under every new comment from the "CommentLuv" plugin! ونحن وصلات dofollow ، وأحصل على آخر بلوق ما بعد بوصفها الخط الثانوي في اطار كل من تعليق جديد "commentluv" البرنامج المساعد! Top commenters for every month are listed on every page of this site in a sidebar widget linked back to your URL! أعلى commenters كل شهر لترد على كل صفحة من هذا الموقع في الشريط الجانبي القطعه ربط عودة الى عنوان موقعك! We would like to reward you for becoming part of our community! ونود ان مكافاه لكم لتصبح جزءا من مجتمعنا! Your comment is valuable not only to us, but also all the other readers of this blog! تعليقك على قيمة ليس فقط بالنسبة لنا فحسب ، بل ايضا سائر قراء هذا بلوق!


Click to add smilies to your post! انقر لاضافة الابتسامات على رسالتك! == []^ =)= ()= (|=) ص= | 8= 0=) ~= 00=)= ؛ ؛=)]= ؛ ؛ ؛