SEO include on page head

I want to create a recordset that retrive information for SEO from the database. But I want to insert this in an include for a PHP project that will be allocated on the page head. For future changes I dont want to replicate changes in every single page. Whats the best approach. I dont get how to use the includes inside the page head.

I dont know if recordset need to be added on include or what?

Any suggestion?

Too complex for me…

Unfortunately Juan,
On php projects you need server side coding for this and it cannot be accomplished otherwise…
AS FAR AS I KNOW

Yes, due to the way php renders you cannot use dynamic seo in the same way you can with node as the tags are rendered at browser level, not server.
Some basic tags like title may work but social media tags like Facebook and twitter will not render properly without the above methods.

1 Like

Here’s an excellent solution by @Heather_Mann

Yes, that is a good alternative, both that and the solution on the post use a php based script in the header to parse the tags prior to the browser rendering then. Similar ideas,different implementations