Wp Affiliate Pro - The #1 Plugin For WordPress Blogs رزمه العمل التابعة الموالية -- # 1 البرنامج المساعد للبلوق WordPress
Powered by MaxBlogPress تصميم maxblogpress

WordPress المأجور # 18 : تقطيع قالب WordPress ملفات | jtpratt للاخطاء المدونات
Jtpratt للاخطاء المدونات





Home المنزل » Wordpress Hack #18: Hacking Wordpress Template Files »WordPress المأجور # 18 : تقطيع قالب WordPress ملفات



Posted in: نشر في :

بلوق - اعداد فئة الصورةصورة نقود فئةالفئة صورة WordPressWordPress سيو - فئة الصورة
1,095 views 1.095 آراء


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.


This tutorial will teach you the essentials about wordpress template files and their hierarchy when hacking your theme . هذا البرنامج التعليمي وسوف يعلمك اساسيات WordPress القالب عن الملفات والتسلسل الهرمي عند تقطيع الموضوع الخاص بك.

This post is part of هذا هو جزء من وظيفة 30 Wordpress hacks in 30 days 30 WordPress المأجورون في 30 يوما .

In my last Wordpress Hack في تقريري الاخير WordPress المأجور Templates for Alternate Sidebar Layouts نماذج لمخططات بديلة الشريط الجانبي I touched on how you can create a theme template file for a page that has different sidebars for the rest of your blog. وتطرق لى كيف يمكنك انشاء نموذج موضوع الملف لصفحة sidebars مختلفة بالنسبة لبقية بلوق الخاص بك. Answering some questions and comments for that article showed me that I need to write a more in-depth article about how the Wordpress Template Hierarchy Works and the choices you have available to your when you create custom template files. This article should change the way you think about your Wordpress theme FOREVER ! الاجابه على بعض الاسءله والتعليقات لتلك المادة تبين لي انني بحاجة الى الكتابة اكثر تعمقا حول كيفية المادة WordPress القالب التسلسل الهرمي والاشغال والخيارات المتاحة لديكم الخاصة بك عندما تقوم بانشاء قالب مخصص ملفات هذه المادة ينبغي أن تغير طريقة التفكير في الموضوع الخاص بك WordPress الى الأبد!

Wordpress is a blogging system that has greatly evolved over. WordPress المدونات هو ان النظام قد تطور الى حد كبير على مدى. It’s evolved as much as bloggers and blogging itself has. انه بقدر ما تطورت من المدونين والمدونات نفسها. Now, you can use it as a full fledged “Content Management System”, you can even use it to create a static web site with no blog at all. الآن ، يمكنك استخدامه بمثابة تام "نظام ادارة المحتوى" ، حتى يمكنك استخدامه لانشاء الموقع على الانترنت مع ساكنة اي بلوق على الاطلاق. I would say that most of us use it as a blog, where the home page has a running “list of posts” from the newest to oldest. واود ان اقول ان معظمنا استخدامه بمثابة بلوق ، حيث في الصفحه الرئيسية لديها ادارة "قائمة الوظائف" من الأقدم الى الأحدث. You can add those posts to “categories”, and now with Wordpress 2.3x+ you can also “tag” them. يمكنك اضافة تلك الوظائف الى "فئات" ، والآن مع WordPress 2.3x + يمكنك ايضا ان "العلامه".

I’m going to explain to your how Wordpress works “out of the box”. انا ذاهب الى حسابك لشرح كيف تعمل WordPress "خارج الصندوق". Keep in mind that this blog has been heavily customized, and I don’t even have blog posts on my homepage anymore - I’ve moved them to “/blog” on this site (which is something you can change in your Wordpress dashboard under “Settings”). ان نضع في اعتبارنا ان هذا بلوق تم تفصيلها الى حد كبير ، وأنا حتى لا يكون بلوق وظائف لم يعد على صفحتي الرئيسية -- لقد قمت بنقلها الى "/ بلوق" على هذا الموقع (وهو أمر يمكنك أن تغير في لوحة التحكم الرئيسية الخاصة بك تحت WordPress "اعدادات").

When a web browser visits a Wordpress blog, the software looks in your theme directory (/wp-content/theme) for the assigned theme. متصفح انترنت عندما زار احد بلوق WordPress ، يتطلع البرامج الخاصة بك في موضوع الدليل (/ wp-content/theme) المخصصه لهذا الموضوع. It’s either “default” (out of the box), or a custom one that you picked out and uploaded to your theme directory. أما انه "افتراضي" (من خارج الصندوق) ، او العرف واحدا يمكنك الحصول عليها من اصل وتحميلها الى حسابك في موضوع الدليل. Wordpress then iterates through your theme files looking for which one to use in a specific order. WordPress ثم يكرر عبر حسابك في موضوع الملفات التي تبحث عن أحد ، لاستخدامها في اجل محدد. That search order might change depending on what Wordpress has been asked to do (show the homepage, show a category page, show search results, show an archive page, etc.). من اجل ان البحث يمكن ان تتغير تبعا لما WordPress وقد طلب الي ان تفعل (عرض الصفحه الرئيسية ، تظهر صفحة هذه الفئة ، تظهر نتائج البحث ، تظهر الصفحه ارشيف ، الخ). Your understanding of this search order (called the “template hierarchy”) is vitally important to your understanding of how Wordpress Themes work. تفهمكم لهذا البحث من أجل (يسمى ب "نموذج هرمي" (ذو اهمية حيوية لتفهمكم للمواضيع WordPress كيفية العمل. If you understand the template hierarchy in Wordpress, you can build custom theme template files and make your blog 100 times more effective, indexable (by search engines), and in the end more profitable. اذا كنت تفهم التسلسل الهرمي في قالب الكلمات يمكنك بناء نموذج مخصص موضوع الملفات وبك بلوق 100 مرة اكثر فعالية ، indexable (عن طريق محركات البحث) ، في نهاية المطاف واكثر ربحيه.

The ال Wordpress Codex has an image of the template hierarchy WordPress الدستور الغذائي قد صورة من نموذج هرمي that spells it all out. وهو ينص على ان جميع. Since that is too big for this page, I created a custom one that is a bit more simplistic for display here: ومنذ ذلك كبيرة جدا لهذه الصفحه ، الاول خلق العرف واحدة أن يكون أكثر قليلا في التبسيط لعرضها هنا :

ما هي الصفحه نموذج هرمي WordPress

When I said “simplistic”, I really meant it - didn’t I? عندما قلت "التبسيط" ، أنا حقا يعني انه -- انا لا؟ As the pictures shows, when a web browser calls a site with Wordpress installed it asks itself “which (template) page do I need (to show the content)?” I’ll explain these php files in depth in a few minutes, but first generally Wordpress asks, is it a date.php (archive) page, is it a category page, is it a tag page, is it the “home” (or blog) page, is it a single (post) page, is it a Wordpress “page” (that you wrote), is it an error 404 (page not found) or seach page, and last is it some kind of attachment. كما تبين الصور ، وعندما يطلب متصفح انترنت موقع مع تركيب WordPress ويطلب من نفسها "التى (القالب) الصفحه هل أنا بحاجة (لاظهار المضمون)؟" انا بي. اتش. بى شرح هذه الملفات في العمق في غضون بضع دقائق ، ولكن الاولى عموما WordPress يسأل ، هل هي date.php (أرشيف) صفحة ، هل هي فئة الصفحه ، هل هي علامة الصفحه ، هل هي "الوطن" (او بلوق) صفحة ، هو واحد (وظيفة) صفحة ، هي WordPress عليها "الصفحه" (إن كنت كتبت) ، هل هو خطأ 404 (لم يتم العثور على الصفحه) أو في صفحة البحث ، والأخير هو نوع من الحجز عليها. You can see in the examples that if the right file is not found, with the exception of attachments, Wordpress will just default to the index.php to display what it needs. يمكنك ان ترى في الامثله انه اذا كان الحق في الملف غير موجود ، باستثناء ملحقات WordPress سوف عادل الافتراضي الى index.php لعرض ما تحتاجه.

The Wordpress Home Page template or “home.php” وقد الصفحه الرئيسية WordPress القالب او "home.php"

Now, let’s dig a little deeper - shall we? والآن ، دعونا حفر أعمق قليلا -- نحن؟ Let’s say that you want to customize your “home” page of your Wordpress blog - the one that by default shows your blog posts. دعنا نقول إن كنت ترغب في قم "الوطن" من الصفحه الخاصة بك بلوق WordPress -- تقصير من جانب واحد ان يبين الخاص بك بلوق وظيفة. MOST themes I’ve dealt with just use “index.php” to show your home page content. معظم المواضيع التي تناولها لقد قمت للتو استخدام "index.php" اظهار منزلك محتوى الصفحه. But if you look at the template hierarchy you see that the first page Wordpress looks for (for the home page) is “home.php”. ولكن اذا نظرنا نظرة في نموذج هرمي كنت انظر في الصفحه الاولى ان يبحث عن WordPress (للاطلاع على الصفحه الرئيسية ( "home.php". Your theme may or may not contain this file. الموضوع الخاص بك قد يكون او قد لا تحتوي على هذا الملف. If you don’t have one, just open index.php and “save as” home.php - customize it to your liking and now you have a custom theme home page template file. اذا لم يكن لديك واحد ، index.php مفتوحة وعادلة "انقاذ" home.php -- تخصيصها ترضيك والآن لديك موضوع مخصص الصفحه الرئيسية القالب الملف. If you want your blog posts to be somewhere else other than your “home” page you will need to create a different template file for a “page” (instructions below), and then assign that “page” the proper template in “Manage->Pages-Pagename” in your Wordpress dashboard. اذا كنت تريد بلوق الخاص بك ان تكون وظيفة في مكان آخر غير الخاص بك "الوطن" صفحة ستحتاج الى انشاء قالب آخر لملف "صفحة" (الارشادات أدناه) ، وبعد ذلك يقوم على ان "الصفحه" في القالب المناسب "ادارة - > صفحات - pagename "في لوحة التحكم الرئيسية الخاصة بك WordPress. Then delete “home.php” and in your Wordpress dashboard “Settings”, assign a different page to home to display what you want. ثم حذف "home.php" وWordPress الخاصة بك في لوحة القيادة "اعدادات" ، واسناد صفحة مختلفة الى الصفحه الرئيسية لعرض ما تريد.

You should also read يجب عليك ايضا ان تقرأ Wordpress Hack #1: Query Posts WordPress المأجور # 1 : وظيفة الاستعلام , and ، Wordpress Hack #15: 12 Ways to Hack Your Home Page WordPress المأجور # 15 : 12 سبل المأجور صفحتك الرئيسية .

Wordpress Category Template Pages الفئة WordPress القالب صفحات

When you write a post you can assign it to a “category”, which is one way of organizing your content. وعند كتابة ما بعد يمكنك ان يسند الى "فئة" ، وهي واحدة طريقة لتنظيم المحتوى الخاص بك. It’s also a way for your visitors to filter through your past content. ولكنها ايضا وسيلة للزائرين لترشيح المحتوى من خلال حسابك في الماضي. When your categories are listed in your sidebar, and you click on one, Wordpress will filter and show only posts that were assigned to that category. عندما يكون الجهاز الفئات المدرجه في الشريط الجانبي الخاص بك ، والنقر على احدها ، WordPress سوف تظهر سوى مرشح والوظائف التي كانت تسند الى تلك الفئة. This is very handy. وهذا مفيد جدا. Wordpress has two ways it can show you post content on pages like this, one is an “excerpt” and the other is the full post. WordPress اثنين من الطرق التي يمكن ان تبين لكم المحتوي على صفحة ما بعد مثل هذا ، هو واحد "المقتطف" والاخر هو وظيفة كاملة. Either way - you have some of the same content listed on this page as you do your (blog) home page, your archive (past post) pages, and (if you’re using them) also tag pages. اما الطريقة -- لديك بعض من نفس المدرجه على محتوى هذه الصفحه التي تتبعونها انتم (بلوق) الصفحه الرئيسية ، الارشيف الخاص بك) الماضي بعد) صفحة ، و (اذا كنت تستخدم منهم) العلامه ايضا الصفحات. This is a horrible, horrible thing to google as they see “duplicate content”. هذا فظيع ، شيء فظيع لصور حيث ترى "ازدواجيه المحتوى". That means that all your pages (while useful to visitors) like this probably won’t be indexed by google and may even count against you. وهذا يعني ان جميع صفحات موقعك (بالرغم من انها مفيدة للزوار) مثل هذا لن يكون على الارجح من جانب صور وفهرستها وايار / مايو حتى العد ضدك.

Now, when it comes to google, and search engines in general - the object is to get as many pages as you can indexed. والآن ، عندما يتعلق الامر الى صور ، ومحركات البحث في العام -- الهدف هو الحصول على اكبر عدد صفحات كما يمكنك فهرستها. The more pages indexed, the more chances you have of somebody finding your blog. المزيد من الصفحات المفهرسه ، لديك فرصة اكثر لايجاد شخص ما من بلوق الخاص بك. Most themes that I’ve seen don’t have any category page at all and just index.php is used to display category content. معظم المواضيع التي قمت ينظر اليه ليس لدى اي فئة في كل صفحة index.php فقط ويستخدم لعرض المحتوى الفئة. This is ok as a category.php file would be used for every single category you have added content too. وهذا هو موافق بوصفها category.php الملف سوف تستخدم لكل فئة واحدة لقد قمت باضافه محتوى ايضا. If you want “original content” on each and every category page then you will need to create a template file for each and every catetgory you have created (I hope you haven’t gone wild). اذا كنت تريد ان "المحتوى الأصلي" على كل بلد وعلى كل صفحة هذه الفئة بعد ذلك ستحتاج الى انشاء نموذج لملف كل وcatetgory التي قمت بانشائها (وآمل ان تكونوا ولم تمض البرية).

If your Wordpress dashboard go to “Manage->Categories”. إذا كانت لوحة التحكم الرئيسية WordPress اذهب الى "ادارة -> الفئات". If you put your mouse over any category name (without clicking), in the bottom of your web browser in the status bar will appear the “category ID”. انك اذا وضعت الماوس فوق أي إسم الفئة (دون نقر) ، في أسفل متصفح الانترنت في شريط الحاله سوف تظهر "رقم تعريف فئة".

رقم تعريف فئة مثلا WordPress

If your theme doesn’t have a “category.php” file (if it does - use it), open up your “index.php” file and “save as “category-18.php” (using your category ID of course), and create one category template file for each category you have in your blog. اذا كان الموضوع ليس لديها "category.php" الملف (اذا فعلت -- استخدامها) ، وتفتح الخاص بك "index.php" وملف "انقاذ" الفئة - 18.php "(الخاصة بك باستخدام رقم تعريف فئة بطبيعة الحال (، وفئة واحدة وخلق نموذج لملف كل فئة لديك في بلوق الخاص بك. In each file add a few paragraphs of original content to each category file, and then when search engines come around to index you - you’ll have some original content on each and every category page!! في كل ملف اضافة بعض الفقرات من المحتوى الأصلي لملف لكل فئة ، ومحركات البحث ، ثم عندما يأتي الى الرقم القياسي في جميع انحاء لكم -- ستسنح لك بعض المحتوى الأصلي على كل صفحة هذه الفئة!

Also, see this as an opportunity (not work). ايضا ، نرى في ذلك فرصة (لا تعمل). Why? لماذا؟ Because it’s an opportunity to make more money. لانه فرصة لاحراز المزيد من المال. You can place different relevant targeted niche ads on each and every category page! يمكنك وضع مختلف المستهدفة ذات الصلة المتخصصه والاعلانات على كل فئة في كل صفحة! Look at home many additional monetization opportunities you just created! النظر في كثير من الصفحه الاولى الى اموال نقديه اضافية خلق فرص أنت فقط!

Regarding Category Templates, you should also read وفيما يتعلق قوالب الفئة ، يجب ان يقرأ ايضا Wordpress Theme Hack: Show Category Images WordPress المأجور الموضوع : عرض صور فئة , and ، Wordpress Hack: 9 Things You can do with Categories WordPress المأجور : 9 امور يمكنك القيام به مع الفئات .

Wordpress Tag Template Pages WordPress القالب العلامه صفحات

Wordpress Template Tag pages work the exact same way as category template pages, with the exception that they use the “slug” (tag keywords) instead of the ID (I don’t know why category template can’t do this too!). WordPress القالب العلامه صفحات العمل بالضبط بنفس الطريقة التي تعامل بها فئة قالب صفحة ، فيما عدا انهم يستخدمون "الدوده البزاقه" (علامة الكلمات الرئيسية) بدلا من رقم تعريف (ولا اعرف لماذا قالب فئة لا تستطيع أن تفعل ذلك ايضا!). So, if you tagged a post “wordpress hacks”, then your tag template file would be “tag-wordpress-hacks.php”. على ذلك ، اذا ما بعد الموسومه "WordPress المأجورون" ، ثم علامة القالب الملف الخاص بك سيكون "علامة - WordPress - hacks.php". In the organization of a blog, categories should be very broad, and tags should be descriptive. في المنظمه من بلوق ، ينبغي أن تكون فئات واسعة جدا ، وينبغي ان تكون العلامات وصفية. A good example of a category would be “news”, or “code”. مثال جيد للفئة سيكون "الاخبار" ، او "المدونه". Tags could be “9-11″ or “css web design”. علامات يمكن ان يكون "9-11" او "CSS تم تصميم الموقع". That’s why optimally you should have maybe a dozen or two categories, but you might have hundreds (even thousands!) or tags. لهذا السبب يجب ان يكون على الوجه الامثل وربما اثنتي عشرة او فئتين ، ولكن قد تكون لديكم مئات (بل الآلاف!) او العلامات. Since I’ve had the same categories since this blog started, but I add new tags all the time - I probably won’t create a custom tag template page for every tag I have. وبما أنني قد قمت نفس الفئات ومنذ بدأت هذه بلوق ، ولكن أود ان أضيف علامات جديدة في كل وقت -- انا على الارجح لن يخلق العرف علامة لكل صفحة القالب العلامه لي. I WILL, however, create one for all the tags I feel are most-used, most-important, and most-monetizable! انا ، ومع ذلك ، في انشاء واحدة لجميع العلامات اشعر الاكثر استخداما ، والاكثر أهمية ، والأكثر monetizable!

You should also read يجب عليك ايضا ان تقرأ Wordpress Hack #15: Hacking Wordpress Tags WordPress المأجور # 15 : تقطيع العلامات WordPress .

Wordpress Author Template Pages المؤلف صفحات WordPress القالب

This is a template page I seldom see used, because most blogs have one author. هذا هو القالب انظر الصفحه انا نادرا ما تستخدم ، لأن معظم بلوق واحد مقدم البلاغ. Many blogs though have multiple contributors and authors - and each post can have an “authored by” link which takes them to the author page. على الرغم من العديد من بلوق متعددة والمساهمين والكتاب -- ولكل وظيفة يمكن ان يكون لها "من تاليف" التي تأخذ منها وصلة لمقدم البلاغ الصفحه. If “author.php” doesn’t exist, index.php will be used by default. اذا كان "author.php" لا وجود له ، index.php سوف تستخدم بشكل افتراضي.

The author.php page can list pages written by that author, all authors, it can list the authors - and be customize any number of ways. وقد author.php الصفحه قائمة يمكن ان الصفحات التي كتبها المؤلف ، جميع المؤلفين ، فإنه يمكن واضعي قائمة -- ويكون تخصيص اي عدد من الطرق. As I said, most themes don’t have this - but if you want a blog with multiple authors you probably want to create a custom author page. وكما قلت ، فان معظم المواضيع التي لا تملك هذا -- ولكن اذا كنت تريد بلوق مع تعدد المؤلفين وربما كنت ترغب في انشاء صفحة مخصص المؤلف. For more information on what’s possible read the لمزيد من المعلومات حول ما هو ممكن قراءة Wordpress Codex page on Author Templates. WordPress صفحة الدستور الغذائي على المؤلف القوالب.

Wordpress Single Post Page Templates WordPress وظيفة واحدة قوالب الصفحات

When you write a post in Wordpress, it’s gets listed on your home (blog) page, your archive page, and the appropriate category and tag pages. عندما كنت في مرحلة ما بعد كتابة الكلمات انها تحصل على قائمة منزلك (بلوق) الصفحه الخاصة بك ارشيف الصفحه ، والفئة المناسبه وعلامة صفحات. But is also has it’s own (full) page, which is what we call the “single.php” or single post page. وانما هو ايضا انها لم الخاصة (بالكامل) صفحة ، وهو ما نسميه "single.php" او ما بعد صفحة واحدة. Nearly every theme has a single.php file, but if it doesn’t then (of course) the single post is displayed using the default index.php theme file. تقريبا كل موضوع له ملف single.php ، ولكن اذا لم يتحقق ذلك الحين (طبعا) وظيفة واحدة يتم عرض باستخدام الافتراضي index.php موضوع الملف.

If your theme doesn’t have a “single.php” create one (based on index.php), if it does - consider customizing it. اذا كان الموضوع ليس لديها "single.php" لخلق واحد (على اساس index.php) ، واذا فعلت ذلك -- النظر في تخصيصه. If you use Adsense I think that the single post is a great place to add a 336×280 block just before your content. اذا كنت تستخدم AdSense واعتقد ان وظيفة واحدة هي مكان عظيم لاضافة 336 × 280 الكتلة قبل لحظات من المحتوى الخاص بك.

Wordpress “Page” Templates WordPress "الصفحه" قوالب

I think that a Wordpress “Page” is the most mis-understood thing in the entire blogging software. واعتقد ان WordPress "صفحة" هو الاكثر اساءة فهم شيء في كل المدونات البرمجيات. When you go to “Write” in the Wordpress dashboard you have options to write a “Post” or a “Page”. عندما تذهب الى "الكتابة" في لوحة القيادة WordPress ديك خيارات لكتابه "ما بعد" او "الصفحه". The choice to write one or the other is a choice basically to use the “blogging paradigm” or not. اكتب لاختيار واحد أو آخر هو اختيار اساسا على استخدام "النموذج المدونات" ام لا. By writing a “post” you are writing not only a “single” page post, but it also will be listed on the home (blog) page, and archive page, as well as category and post pages. من خلال كتابه "ما بعد" انت وليس فقط كتابه "وحيد" صفحة ما بعد ، ولكنها أيضا ستكون مدرجة على الصفحه الرئيسية (بلوق) صفحة ، والصفحه ارشيف ، فضلا عن وظيفة من الفئة صفحة. The choice to author a “page” is like an “about page” - it’s static in the sense that it won’t be listed on blog type pages. اختيار المؤلف الى "الصفحه" مثل "صفحة عن" -- أنها ساكنة في بمعنى انها لن تكون قائمة على نوع صفحة بلوق. It will only be listed in the navigation of your theme or a list of “pages” in the sidebar. وهو لن يؤدي الا الى ادراجها في قائمة الملاحة الخاص بك من موضوع او قائمة "صفحات" في الشريط الجانبي.

Pages can be anything, an about page, an advertise with us page, a contact page, or even a series page where you provide descriptions of posts and link to them on one central location. صفحات يمكن ان تكون اي شيء ، عن صفحة ، أعلن معنا صفحة ، صفحة اتصال ، او حتى مجموعة الصفحه التي يتم بها تقديم وصف للوظائف ومنهم على وصلة الى موقع مركزي واحد. Pages are a great way to organize content in your blog, and the more you create - the more you’ll find the need to create custom layouts. صفحات هي طريقة راءعه لتنظيم المحتوى الخاص بك في بلوق ، وكلما قمت بانشاء -- أكثر ستجد الحاجة الى انشاء العرف التنسيقات. On this blog I created a page template with a custom sidebar for my على هذا بلوق لي خلق قالب الصفحه مع الشريط الجانبي مخصص لبلادي forum المنتدى . I also created a special one for my وأود أيضا ان خلق خاص واحد لبلادي archived posts sitemap الارشيف وظائف خريطه الموقع , and ، testimonials الشهادات . On one of my other blogs I created one with no sidebar at all for my على واحد من بلادي الاخرى بلوق خلقته مع أي واحد في الشريط الجانبي لجميع بلادي find cheapest gas ايجاد أرخص الغاز page. الصفحه.

If you want to create a custom template theme file for that you can assign to any “page” that you write in Wordpress all you need to do is open your index.php file and “save as” whatever name you want (like sitemap-template.php or whatever). اذا اردت انشاء قالب مخصص لموضوع الملف يمكنك ان يسند الى اي "الصفحه" ان تكتب في WordPress كل ما عليك القيام به هو افتح ملف index.php و "انقاذ" ايا كان الاسم الذي تريده (مثل خريطه الموقع - template.php أو أيا كان). I try to name all mine something-template.php, just to keep them straight. احاول ان اعبر باسم جميع الالغام - template.php شيء ، لمجرد الاحتفاظ بها مباشرة.

In the top of that page you are going to need to add the following code (copy and paste) so it gets identified as a template in Wordpress: في اعلى الصفحه التي انت الذهاب الى الحاجة الى اضافة الشفره التالية (نسخ ولصق) ومن ثم تحديد ما يحصل في قالب WordPress :

 <?php /* Template Name: My Template Page */ ?> <؟ بي. اتش. بى / * اسم القالب : قالب بلدي الصفحه * /؟> 

Change “My Template Page” to whatever you’re naming your template, and then customize the page by creating a تغيير "بلادي صفحة القالب" الى ما تسميه انت النموذج الخاص بك ، ثم تخصيص صفحة عن طريق انشاء master archive index template ماجستير أرشيف الرقم القياسي قالب , create a ، وإنشاء custom 404 error page template عرف خطأ قالب الصفحه 404 , or even ، او حتى create templates with alternate sidebar layouts انشاء قوالب الشريط الجانبي مع مخططات بديلة .

In your Wordpress dashboard to assign a template, just scroll down past the post text box and under “template”, just find your custom template in the drop down and choose it to apply that particular template to your page and “save”! WordPress الخاصة بك في لوحة اجهزة القياس لتحديد قالب ، فقط انزل الماضي منصب ومربع النص في اطار "نموذج" ، مجرد العثور على عهدك القالب في اسقاط واختياره ولا سيما في تطبيق هذا النموذج لصفحتك و "انقاذ"!

The possibilities are endles… الامكانيات هي endles…

Creating a Custom Wordpress Search Page إنشاء صفحة البحث المخصص WordPress

In Wordpress when someone searches your content, “search.php” is used for the results. واذا كان شخص ما في WordPress البحث المحتوى الخاص بك ، "search.php" يستخدم لالنتائج. You could create a انت يمكن ان تخلق custom search results template نتائج البحث المخصصه قالب so people find what they need each and every time. حتى يجد الناس ما يحتاجون اليه في كل مرة. You could also monetize this page with an ad if you wished, or just provide links to your top content on top of the search results. يمكنك ايضا ان نقد هذه الصفحه مع اعلان إن رغبت ، أو مجرد توفير وصلات إلى حسابك في اعلى محتوى على اعلى نتائج البحث. If your theme doesn’t have a search.php, just create one based on index.php. اذا كان الموضوع ليس له search.php ، في انشاء واحدة فقط على اساس index.php.

Creating a Custom 404 Error Page in Wordpress ايجاد العرف في 404 صفحة الخطأ WordPress

I think that one of the most important things is not just what people see when they find your content, it’s what they see what they don’t find anything at all. واعتقد ان واحدا من أهم الاشياء التي ليست مجرد ما يرى الناس عندما تجد المحتوى الخاص بك ، وهو ما نرى ما لا نجد شيئا على الاطلاق. If someone gets a “404 page not found” error on your Wordpress blog, Wordpress looks for the “404.php” file first, and if you don’t have one it uses index.php by default. فإذا كان شخص ما يحصل "لم يتم العثور على الصفحه 404" خطأ علي بلوق WordPress الخاص بك ، WordPress يبحث عن "404.php" الملف اولا ، واذا لم يكن لديك واحد وهو يستخدم index.php افتراضي. If you don’t have one, create it based on your index.php file - and then customize it right away! اذا كنت لا تملك واحدة ، وخلق الخاص بك على اساس انه ملف index.php -- وبعد ذلك التخصيص على الفور! Most themes just have some bogus default message like “error - not found”. معظم المواضيع فقط بعض التقصير رسالة زاءفه مثل "خطأ -- لم يتم العثور علي".

The first thing you want ot do is to erase that and put a nicer message. اول شيء تريد القيام به هو العبارات التي لمحو ألطف ووضع الرسالة. Write a paragraph and include some links to your top areas AND your contact form in case they want to get ahold of you. كتابة فقرة وتتضمن وصلات إلى حسابك في بعض المناطق واعلى شكل من اشكال الاتصال الخاصة بك في حالة انهم يريدون الحصول ahold لكم. Next, install a plugin that gives them automatically the best results it can - for details read المقبل ، وتركيب البرنامج المساعد تلقائيا ان تتيح لهم تحقيق افضل النتائج يمكن -- لقراءة التفاصيل Wordpress Hack #4: Create a Custom Error 404 Page WordPress المأجور # 4 : انشاء عرف الخطأ صفحة 404 .

Wrapping it Up… غلاف عنه…

No matter where you got your Wordpress theme, and whether it was basic or a Premium one you paid top dollar for - it CAN and SHOULD be customized to it’s fullest possible extent. بغض النظر عن المكان الذي حصلت WordPress الموضوع الخاص بك ، وعما اذا كانت الاساسية او دفع قسط واحد لكم أعلى الدولار ل-- انه يمكن وينبغي ان تكون مكيفة لانه اقصى حد ممكن. A theme designer often is worried about the web design and layout aspect ONLY with no consideration for organization of your blog, it’s content, SEO and search indexing capabilities - let alone error messages or search pages. موضوع مصمم في كثير من الاحيان هو قلق من تصميم الموقع وتصميم الجانب فقط دون اي اعتبار لمنظمة بلوق الخاص بك ، ومضمون سيو البحث والفهرسه القدرات -- ناهيك عن رسائل خطأ أو صفحات البحث. Do your self (and your visitors) a favor and make sure that you have ALL areas of your Wordpress template hierarchy covered! هل نفسك (والزوار) (أ) لصالح والتأكد من ان لديك جميع المجالات الخاصة بك WordPress القالب من التسلسل الهرمي المشموله!

I hope I didn’t give you too much work to do, but by the time you’re done with everything I just taught you you will have a much better understanding of how Wordpress and Wordpress Themes work. وأمل ان لم اكن لك الكثير من العمل الذى يتعين القيام به ، ولكن بحلول الوقت الذي كنت فعلت مع كل شيء انا فقط كنت تعلم انك سوف يكون لها الكثير من فهم افضل لكيفية WordPress WordPress ومواضيع العمل. When you’re done you might be interested in moving on an reading وعند انتهائك من ذلك انك قد تكون مهتمة في التحرك على القراءة How to Create Your Own Wordpress Theme كيف تصنع بنفسك WordPress الموضوع


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

2 Responses to “Wordpress Hack #18: Hacking Wordpress Template Files” 2 الردود على "WordPress المأجور # 18 : WordPress تقطيع قالب" ملفات

  1. Erika أريكا Has the following to say... وقد ما يلي...

    All of the wordpress sites I’ve built - from scraaaaaaatch, at that - and I’ve never thought of creating an author.php page! WordPress من جميع المواقع لقد قمت بني -- من scraaaaaaatch ، في ذلك -- وأنا أبدأ التفكير في ايجاد author.php الصفحه! Ugh! هتاف اشمئزاز! I had to write that one down. كان علي أن أكتب واحد الى اسفل. LOL. الضحك بصوت مرتفع.

    Erikas last blog post.. Erikas الماضي بعد بلوق.. Miami Web Design تم تصميم الموقع من ميامي

  2. Paul U بول ش Has the following to say... وقد ما يلي...

    Thanks for sharing! شكرا لتقاسم!

    I’ve been doing some tweaking on Blogger template before but I find i hard on Wordpress template. لقد كنت تفعل بعض اللف المدون على النموذج قبل ولكنني أجد من الصعب علي انا WordPress القالب.

    Paul Us last blog post.. بول لنا الماضي بعد بلوق.. Courage + money شجاعة + المال = success [Digg] نجاح [البحث بعمق]

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=)= ؛ ؛=)]= ؛ ؛ ؛