How to meta description get value from post?

Recommended Answers

All 2 Replies

set a database field called metadescription then on page load do something like

<meta name="description" content="<?php echo $metadescription ?>">

then it will echo the description of each post when you call for it based on ID of post or how ever you have it generate...

Member Avatar for diafol

Why would you want to do this? Are you talking about $_POST or an article post? If the former - don't do it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.