List view in default theme?
-
- Sr. Bludit
- Posts: 35
- Joined: Thu Jan 05, 2023 9:07 pm
- Has thanked: 11 times
- Been thanked: 2 times
Alls;
just stumbled into bludit after considering wordpress more and more too big for my tiny personal blogging needs these days, so far like what I see and pretty much admired the wordpress importer too. However, a mostly simple first question for that: I used / tried the two standard themes which are pretty good already, but I would like to not have all full posts on the start page but just a link, maybe image, and maybe teaser text if the article has set one. Is that something that's possible by configuration somewhere, or does it need change on the template code?
Thanks and best,
Kristian
just stumbled into bludit after considering wordpress more and more too big for my tiny personal blogging needs these days, so far like what I see and pretty much admired the wordpress importer too. However, a mostly simple first question for that: I used / tried the two standard themes which are pretty good already, but I would like to not have all full posts on the start page but just a link, maybe image, and maybe teaser text if the article has set one. Is that something that's possible by configuration somewhere, or does it need change on the template code?
Thanks and best,
Kristian
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
There are severeal "scenarios".kr428 wrote: ↑Fri Jan 06, 2023 8:09 am However, a mostly simple first question for that: I used / tried the two standard themes which are pretty good already, but I would like to not have all full posts on the start page but just a link, maybe image, and maybe teaser text if the article has set one. Is that something that's possible by configuration somewhere, or does it need change on the template code?
1) Title
Use the following code to display the title:
Code: Select all
<!-- Page title -->
<a class="text-dark" href="<?php echo $page->permalink(); ?>">
<h2 class="title"><?php echo $page->title(); ?></h2>
</a>
Use
Code: Select all
<!-- Page title -->
<a class="text-dark" href="<?php echo $page->permalink(); ?>">
<h2 class="title"><?php echo $page->title(); ?></h2>
</a>
Code: Select all
<!-- Page title -->
<a class="text-dark" href="<?php echo $page->permalink(); ?>">
<h2 class="title"><?php echo $page->title(); ?></h2>
</a>
<!-- Page description -->
<?php if ($page->description()): ?>
<p class="page-description"><?php echo $page->description(); ?></p>
<?php endif ?>
<!-- Page content until the pagebreak -->
<div>
<?php echo $page->contentBreak(); ?>
</div>
<!-- Shows "read more" button if necessary -->
<?php if ($page->readMore()): ?>
<div class="text-right pt-3">
<a class="btn btn-primary btn-sm" href="<?php echo $page->permalink(); ?>" role="button"><?php echo $L->get('Read more'); ?></a>
</div>
<?php endif ?>
The cover image is only used by the theme Blog X. To add it to the theme Alternative use the following:
Code: Select all
<!-- Cover image -->
<?php if ($page->coverImage()): ?>
<img class="card-img-top mb-3 rounded-0" alt="Cover Image" src="<?php echo $page->coverImage(); ?>"/>
<?php endif ?>
There are two possibilities.
You can use the text before the page break of the content of your page or post. In the editor TinyMCE there is a button to insert a page break.
You can also use the field "Description" (if you edit a content at "Options" > "General"). This field is displayed with the following code:
Code: Select all
<!-- Page description -->
<?php if ($page->description()): ?>
<p class="page-description"><?php echo $page->description(); ?></p>
<?php endif ?>
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets