Multiple OpenGraph Meta's for various pages

Matt @ BSH

New member
Registered
Joined
May 16, 2017
Messages
11
Points
0
Hi there,

I'm currently working on a project where I have various landing pages and on each landing page, I need custom OpenGraph metas to promote that individual page for SEO reasons.

My question is, is the best way to do this using IF statements within my header.php file showing different tags depending on what page is being viewed?

I'm not using any CMS system like WordPress as this is a bespoke project.

Any guidance would be greatly appreciated.

Thanks

Matt
 

DaRecordon

Well-known member
Registered
Joined
Oct 7, 2016
Messages
242
Points
18
My question is, is the best way to do this using IF statements within my header.php file showing different tags depending on what page is being viewed?

I'm not using any CMS system like WordPress as this is a bespoke project.
If you are using Wordpress or a custom CMS that you are building then it is possible to create a custom code for that.

I don't know about your CMS but you can use somethings like this

Code:
include_once(metatags.php);
You can play around with codes in this file metatags.php and displaying different tags on what pages you wanted.
 
Newer Threads
Replies
2
Views
1,849
Replies
5
Views
3,326
Replies
12
Views
3,081
Replies
0
Views
1,626
Recommended Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top