Wordpress php meta data and title

1 replies
I want to use some php code for my meta data and title.
Basically if the page is a blog post I want it to automatically pull the post title as the meta title of the post, and for the meta description to automatically pull the content. Both limited to a certain amount of characters. Title limited to 60, content (meta description) limited to 160.

Anyone know how to do this? Also would be nice to include all the pages in an if/else statement. i.e. if -home use this as meta data, if-category use this as meta data, if-post use this as meta data....so on and so fourth.
#data #meta #php #title #wordpress

Trending Topics