B
B
Bce_ycTaJI2022-01-13 09:30:24
HTML
Bce_ycTaJI, 2022-01-13 09:30:24

How to make a meta tag for a specific page if I have a header connected to it via include?

If I include a meta tag in a file with a header, then it will connect to all sites where this file is connected. How to deal with it

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Damir Aushenov, 2015-10-21
@timtimIT

.item li {
  width: 235px;
  display: inline-block;
}

H
holfza, 2015-10-21
@holfza

.item li {
  vertical-align: text-bottom;
}

M
MrColdCoffee, 2022-01-13
@MrColdCoffee

add condition to header file

<head>
<title>test</title>
<meta charset="utf-8"/>
<?php if(...){ ?>
< тут meta для подходящей страницы>
<?php } ?>
</head>

G
galaxy, 2022-01-13
@galaxy

For example:
header.php

<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="style.css">
<?=$additional_meta ?? ""; ?>
</head>

page.php
<?php
$additional_meta = "<title>Как сделать meta tag для определенной страницы, если у меня шапка на нее подключается через include?</title>";
include("header.php");
?>
<body>
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question