Text on the home page
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
You can use the following:
Code: Select all
<?php
$current_page = $_SERVER['REQUEST_URI'];
if (strpos($current_page, '/category') === false): ?>
<p>"TEXT"</p>
<?php endif ?>
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
-
- Jr. Bludit
- Posts: 5
- Joined: Fri Oct 08, 2021 8:49 am
Or you can do it in this way...
Code: Select all
<?php if ($WHERE_AM_I == 'home'): echo "Some Text"; endif; ?>
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
This is the better solution. I thought this condition would also be used for categories.jbuchberger wrote: ↑Sat Nov 20, 2021 6:41 pmCode: Select all
<?php if ($WHERE_AM_I == 'home'): echo "Some Text"; endif; ?>
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets