لقد تم في محاولة لمعرفة كيفية عرض المشاركات كامل على الصفحة الرئيسية, ومقتطفات عن جميع المحفوظات لعن 3 days. This is nice because it means a decent amount of each post is shown on the front page, whilst archive pages contain a much more concise summary of each post. This is better both for humans, وأيضا ل هذا - صفحات أرشيف بلدي الآن ليس لديها محتوى مكرر من صفحتي الرئيسية!
I’ve finally produced a solution. It’s not especially elegant, but I’ve been at the very limit of my بي أتش بي knowledge just to achieve this method. This applies specifically to the Mystique 3 موضوع, other themes are likely to vary, although some of this information may or may not prove relevant. If you are trying or succeed in doing the same to a different theme do drop a comment in.
How it currently works
Mystique has options which allow the admin to choose whether to display 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 generates the content via a call to the function getContent in the file AtomObjectPost.php. If this line is commented the post contents disappear from archive pages.
الأحمال وظيفة getContent الخيارات دولار، وباعتبارها النتائج إما يدعو the_content() أو the_excerpt() والتي هي وظائف المدمج في وورد.
الحل
I’ve managed to achieve what I wish by modifying teaser.php — but its a bit of a botch job I think. I just replaced
[فب]<?فب (is_sticky() && is_home()) ? the_content() : $app->post->محتوى(); ?>[/فب]
مع
[فب]<?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 implement this solution via an addition to functions.php but I have no idea how to do so. My بي أتش بي المعرفة ليست مجرد جيدة بما فيه الكفاية.
“Hi James I realise it has been a long while, but I just checked this on windows 11 (build 23H2)…”