Jump to content

Anyone tell me how to create meta tags in 1 page and link them across other pages?


man5

Recommended Posts

You can always a header.inc.php of some kind  and just include at the top of you web pages:

 

For example:

<?php
require('lib/includes/utilities.inc.php');
include 'lib/includes/header.inc.php';
?>

You can also do something like this (although a little more elaborate in your case) inside the header.inc.php file:

if (preg_match("/J.R. Pepp | Website Design/i", $pageTitle)) {
  $metaDesc = '<meta name="description" content="J.R. Pepp is a Website Design and Development Company based in Livonia, Michigan.">';
}

That way all you meta tags (elements)  will be on every page and appropriate depending on the page.

 

An for the question what is a meta tag?

 

"Meta elements are the HTML or XHTML <meta … > element used to provide structured metadata about a Web page. Multiple Meta elements with different attributes are often used on the same page. ..."

Edited by Strider64
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.