DIY وسائل الإعلام الرئيسية الشعار

الموقع النهائي لتصميم وإنشاء مسرح منزلي الخاص ومرحبا فاي الإعداد الخاصة.

0شعار ووردأحجية 3 موضوع: كاملة وظيفة ومقتطفات

لقد تم في محاولة لمعرفة كيفية عرض المشاركات كامل على الصفحة الرئيسية, ومقتطفات عن جميع المحفوظات لعن 3 days. This is nice because it means a decent amount of each post is shown on the front page, whilst archive pages con­tain a much more con­cise sum­mary of each post. This is bet­ter both for humans, وأيضا ل هذا - صفحات أرشيف بلدي الآن ليس لديها محتوى مكرر من صفحتي الرئيسية!

I’ve finally pro­duced a solu­tion. It’s not espe­cially eleg­ant, but I’ve been at the very lim­it of my بي أتش بي know­ledge just to achieve this meth­od. This applies spe­cific­ally to the Mys­tique 3 موضوع, oth­er themes are likely to vary, although some of this inform­a­tion may or may not prove rel­ev­ant. If you are try­ing or suc­ceed in doing the same to a dif­fer­ent theme do drop a com­ment in.

How it currently works

Mys­tique has options which allow the admin to choose wheth­er to dis­play excerpts or full posts. This option is stored as $post_content_mode inside the $options array.

ملف archive.php يعرض الأرشيف ويعرض كل مشاركة في حلقة عبر teaser.php

teaser.php لديه خط

[فب]<?فب (is_sticky() && is_home()) ? the_content() : $app->post->محتوى(); ?>[/فب]

This line gen­er­ates the con­tent via a call to the func­tion get­Con­tent in the file AtomObjectPost.php. If this line is com­men­ted the post con­tents dis­ap­pear from archive pages.

الأحمال وظيفة getContent الخيارات دولار، وباعتبارها النتائج إما يدعو the_content() أو the_excerpt() والتي هي وظائف المدمج في وورد.

الحل

I’ve man­aged to achieve what I wish by modi­fy­ing teaser.php — but its a bit of a botch job I think. I just replaced

[فب]<?فب (is_sticky() && is_home()) ? the_content() : $app->post->محتوى(); ?>[/فب]

With

[فب]<?php if(is_home()): ?>
<?فب (is_sticky() && is_home()) ? the_content() : $app->post->محتوى(); ?>
<?php else: ?>
<?فب (is_sticky() && is_home()) ? the_excerpt() : $app->post->محتوى(‘e’); ?>
<?php endif; ?>[/فب]

A better solution?

I would rather imple­ment this solu­tion via an addi­tion to functions.php but I have no idea how to do so. My بي أتش بي المعرفة ليست مجرد جيدة بما فيه الكفاية.

اترك رد