I would like to add dynamic meta description tags.
-
But I’d like to do it myself, editing the template files. I know I have to edit the headер.php file and as I did so I try putting the_excerpt() where I wanted the excerpt to show up (the meta description tag), but all that came up was “
and nothing of the rest of the static meta text I added after the excerpt call.I searched around and found out that the_excerpt() can only be used in The Loop and does not contain anything outside of it. Or in other words it’s not that easy to do.
Also I tried copying the function contained in the plugin add-meta-tags but it didn’t seem to work, or perhaps I didn’t use it correctly?
PS. I know you might say just use some plugin, but I don’t want to do that. So if you could help me out to figure this out I’ll be very grateful!
- The topic ‘I would like to add dynamic meta description tags.’ is closed to new replies.