Answer the question
In order to leave comments, you need to log in
If it is on this page?
<?php if (is_front_page() || is_home()) : ?>
- checks if you are on the main page, right?
But how to register, so that it checks not the main page of the site, but the specific one on which you are currently located?
I'm trying to remove circular references.
Answer the question
In order to leave comments, you need to log in
use $_GET['page'] = 'page name'
links https://domain.xyz/index.php?page=about
mask them in htaccess RewriteRules
RewriteRule ^about(/?)+$ index.php?page=about [L]
https://domain.xyz/about
request a page
if(isset($_GET['page']) && $_GET['page'] != '') {
if($_GET['page'] == 'home') {
echo ('на главной странице');
} elseif($_GET['page'] == 'about') {
echo ('на странице О нас');
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question