How to get URL to a specific site (Theme)?

Post Reply
andrklein
Ssr. Bludit
Posts: 10
Joined: Sun Oct 21, 2018 6:46 pm

Hey guys,

I'm trying to make my own theme for Bludit and I've done the tutorial. I understand the basics of theming now but I struggle to get the specific URL for the sites/articles.

I now have:

Code: Select all

<?php if ($WHERE_AM_I=='page'): ?>
        <p>The user is watching a particular page</p>
    <?php elseif ($WHERE_AM_I=='home'): ?>
         <?php foreach ($content as $page): ?>
            <h3><?php echo $page->title(); ?></h3>
        <?php endforeach ?>
    <?php endif ?>
This code example is from the official tutorial. What do I need to change to get the <h3> Headline as a clickable <a> link to the page?

Thanks in advance.

Kind regards,
andrklein
andrklein
Ssr. Bludit
Posts: 10
Joined: Sun Oct 21, 2018 6:46 pm

Alright, got it. Taken from Alternative-Theme (Default theme for Bludit).

Code: Select all

<!-- Page title -->
<a href="<?php echo $page->permalink(); ?>">
<h3 class="title"><?php echo $page->title(); ?></h3>
</a>
Post Reply